@@|http://*.wiki[pm]edia.org/ not working as expected

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

@@|http://*.wiki[pm]edia.org/ not working as expected

Post by Johannes »

I would like to add a set of rules that disables adblock plus for all wikimedia projects (i.e. all wikipedia editions plus their many friends)

Shouldn't the string wiki[pm]edia match "wikipedia" and "wikimedia"? I have tried several other variations, like "wiki(p|m)edia" or "wiki[p,m]edia". None match.

This is not really important, however I am so surprised. Am I missing something ultra-important? Or why the heck would such a simple rule not work?
User avatar
Stupid Head
Posts: 214
Joined: Sat Aug 26, 2006 8:11 pm
Location: USA

Post by Stupid Head »

If you want to use regular expressions, you must enclose them within slashes. Also, you are mixing regular expressions with simple filter syntax.

The correct regular expression would be @@/^http://.*\.wiki[mp]edia\.org// but that would only whitelist the elements, not the page itself.

To whitelist the actual pages, add two filters: @@|http://*.wikimedia.org/ and @@|http://*.wikipedia.org/. This method is recommended over the regular expression.
What, me worry?
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

Or how about just:

@@|http://*wiki*edia.org/
Wladimir Palant

Post by Wladimir Palant »

Rick, that filter is a little too general. Having two filters certainly is better here.
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

Wladimir Palant wrote:Rick, that filter is a little too general. Having two filters certainly is better here.
That would be a tough match. But I suppose that you are probably right. Subdomains could play a role there. So I agree with you guys.
Locked