RegEx "(de|fr)" doesn't work?!

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
Eagle

RegEx "(de|fr)" doesn't work?!

Post by Eagle »

Hi there,

got a website I regularly visit, but since some weeks, there's an ad from a service offering game-downloads similar to Steam..

So, I'd like to block that ad-stuff and therefore created a filter-rule like this:

Code: Select all

metaboli.(de|fr)
But that just won't work - but if I change it to

Code: Select all

metaboli
it will work fine.

Though, the reason I'd prefer to use a filter of the first style, because there might be a website using a folder-name like that and the filter shouldn't block that - just stuff from metaboli.de and metaboli.fr ;)


Thanks in advance,
Martin.. :)
Fox
Posts: 300
Joined: Sat Jun 10, 2006 3:05 pm
Location: Finland

Post by Fox »

That's invalid, regular expressions starts and ends with /
According to this tool: http://adblock.free.fr/optimize/index.php
Correct one is:

Code: Select all

/metaboli\.(de|fr)/
But regular expressions are slow, these two rules work MUCH faster:

Code: Select all

metaboli.de
metaboli.fr
Read these two:
http://adblockplus.org/en/deregifier
http://adblockplus.org/en/faq_internal#filters
...That means that if you need 20 simple filters to replace one regular expression then it is still worth it...
Eagle

Post by Eagle »

Thanks a lot!

I'm going to use "metaboli.de" and "metaboli.fr" then.. ;)

Though I knew that regex-syntax normally is /somestuff/, I looked at the other rules and maybe there was some misunderstanding about that within my mind.. - Again, sorry for that..


Take care and thanks,
Martin.. :)
Locked