[Mediawiki-l] Syntax for RegEx

Andy Roberts aroberts at gmail.com
Tue Jul 18 10:37:01 UTC 2006


I don't understand the syntax for contructing regular expressions yet,
can anybody help please?

I wanted to make one which catches all external links to sites which
begin with the number 1 and also end with .org   as this is a spam
pattern I have been having repeated trouble with recently, but using
|1*.org|  has the unintended effect of blocking all .orgs

So I reverted to this:

$wgSpamRegex="/(phente|xanax|valium|geocities|casino|myflooring.org|display:none|-ambien|overflow:[
\t\n]*auto)/";

Cheers
-- 
Andy Roberts



More information about the MediaWiki-l mailing list