Page 1 of 1

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

Posted: Tue Dec 05, 2006 6:05 pm
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?

Posted: Tue Dec 05, 2006 10:03 pm
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.

Posted: Tue Dec 05, 2006 10:15 pm
by rick752
Or how about just:

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

Posted: Tue Dec 05, 2006 10:53 pm
by Wladimir Palant
Rick, that filter is a little too general. Having two filters certainly is better here.

Posted: Tue Dec 05, 2006 11:52 pm
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.