View previous topic :: View next topic |
Author |
Message |
SnarlCat
Joined: 26 Oct 2004 Posts: 55
|
Posted: Thu Oct 28, 2004 Post subject: Backreference matching |
|
|
All-
I'm looking to write a rule that, I think, would help filter a fair amount of logging and profiling many sites partake in. I've noticed that numerous sites include thier web address later in the URL (eg.: http://www.foo.com/blah/&%asf94798www.foo.com/blah2) .. what I would like to do is to capture the first <foo.com> and look for a subsequent match in the address.
For the unix people, i'm looking for something along the lines of: http.*\([\w\d]?\.\w\)\/.*\1 , capturing www.foo.com into pattern 1 for matching later in the string....
Perhaps it'd be better to break the original pattern into blocks, such as 'www', 'foo', 'com' for matching - another question for another time.
Any suggestions or ideas? Does this make sense to do? How would this be done in JS-compatable regexs?
Thanks for your thoughts..
SnarlCat _________________ --
"There are 11 types of people -- those that understand binary, those that don't, and those that think they do." |
|
Back to top |
|
 |
G
Joined: 10 Oct 2004 Posts: 550
|
Posted: Thu Oct 28, 2004 Post subject: |
|
|
That would effectively prevent you from using links that include referrer information. Tons of false positives - not a good idea in my book. _________________ Filterset.G |
|
Back to top |
|
 |
Ed

Joined: 16 Aug 2004 Posts: 120
|
Posted: Thu Oct 28, 2004 Post subject: Re: Backreference matching |
|
|
SnarlCat wrote: | "There are 11 types of people -- those that understand binary those that don't, and those that think they do." | Shouldn't you have a 3rd choice??  _________________ Running: WinXP(SP2)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.13) Gecko/20060414
Adblock v.5 d3 Nightly * 42
I'd rather have a full bottle in front of me than a full frontal lobotmy |
|
Back to top |
|
 |
SnarlCat
Joined: 26 Oct 2004 Posts: 55
|
Posted: Thu Oct 28, 2004 Post subject: |
|
|
Ed-
hm... somewhere, that phrase hit the bit bucket.. of course, missing that phrase is somewhat self-incriminating, eh?
Thanks; I'll get that fixed...[/quote] _________________ --
"There are 11 types of people -- those that understand binary, those that don't, and those that think they do." |
|
Back to top |
|
 |
SnarlCat
Joined: 26 Oct 2004 Posts: 55
|
Posted: Thu Oct 28, 2004 Post subject: |
|
|
Um.. ok.. so I'm feeling pretty stupid..
Neither of us can read very well... there are three groups defined...
.. need more (sleep|caffiene){2,} ... _________________ --
"There are 11 types of people -- those that understand binary, those that don't, and those that think they do." |
|
Back to top |
|
 |
rue Developer
Joined: 22 Oct 2003 Posts: 752
|
Posted: Thu Oct 28, 2004 Post subject: |
|
|
SnarlCat:
Adblock is presently impervious to backrefs -- it will not capture inside the expression. |
|
Back to top |
|
 |
Ed

Joined: 16 Aug 2004 Posts: 120
|
Posted: Fri Oct 29, 2004 Post subject: |
|
|
I'm still tryin' to figure out how I misread it Too late a night or too early a morning...It is a nice sig though  _________________ Running: WinXP(SP2)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.13) Gecko/20060414
Adblock v.5 d3 Nightly * 42
I'd rather have a full bottle in front of me than a full frontal lobotmy |
|
Back to top |
|
 |
Zachariah

Joined: 21 Jul 2004 Posts: 703 Location: Earth
|
Posted: Fri Oct 29, 2004 Post subject: |
|
|
Ed wrote: | I'm still tryin' to figure out how I misread it Too late a night or too early a morning...It is a nice sig though  | there's a new comma in there which makes it easier to read, now _________________ • Latest Adblock!
• If all else fails try a really fresh install of Firefox. |
|
Back to top |
|
 |
|