The Adblock Project Forum Index The Adblock Project
Pull up a seat ...stay a while.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Backreference matching

 
Post new topic   Reply to topic    The Adblock Project Forum Index -> Main
View previous topic :: View next topic  
Author Message
SnarlCat



Joined: 26 Oct 2004
Posts: 55

PostPosted: Thu Oct 28, 2004    Post subject: Backreference matching Reply with quote

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
View user's profile Send private message
G



Joined: 10 Oct 2004
Posts: 550

PostPosted: Thu Oct 28, 2004    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Ed



Joined: 16 Aug 2004
Posts: 120

PostPosted: Thu Oct 28, 2004    Post subject: Re: Backreference matching Reply with quote

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?? Very Happy
_________________
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
View user's profile Send private message
SnarlCat



Joined: 26 Oct 2004
Posts: 55

PostPosted: Thu Oct 28, 2004    Post subject: Reply with quote

Ed-

hm... somewhere, that phrase hit the bit bucket.. of course, missing that phrase is somewhat self-incriminating, eh? Wink

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
View user's profile Send private message
SnarlCat



Joined: 26 Oct 2004
Posts: 55

PostPosted: Thu Oct 28, 2004    Post subject: Reply with quote

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
View user's profile Send private message
rue
Developer


Joined: 22 Oct 2003
Posts: 752

PostPosted: Thu Oct 28, 2004    Post subject: Reply with quote

SnarlCat:
Adblock is presently impervious to backrefs -- it will not capture inside the expression.
Back to top
View user's profile Send private message
Ed



Joined: 16 Aug 2004
Posts: 120

PostPosted: Fri Oct 29, 2004    Post subject: Reply with quote

I'm still tryin' to figure out how I misread it Embarassed Too late a night or too early a morning...It is a nice sig though Smile
_________________
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
View user's profile Send private message
Zachariah



Joined: 21 Jul 2004
Posts: 703
Location: Earth

PostPosted: Fri Oct 29, 2004    Post subject: Reply with quote

Ed wrote:
I'm still tryin' to figure out how I misread it Embarassed Too late a night or too early a morning...It is a nice sig though Smile
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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The Adblock Project Forum Index -> Main All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group