On 7/18/06, Rotem Liss <mail(a)rotemliss.com>
wrote:
Andy Roberts wrote:
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
I think |1[a-z\.]*\.org| should work, but I haven't tested it. The
phrase "1*" actaully means "zero or more occurrences of the character
1".
This should get it, I think.
$wgSpamRegex="/1.*\.org/";
Which is interpreted as
/1 - the literal characters "/" then "1" followed by
.* - a run of zero or more arbitrary characters
\. - the literal character "." (the backslash is needed to treat . as a
literal
rather than it's normal meaning of any character
org/ - the literal characters "org"
--
Rick DeNatale
IPMS/USA Region 12 Coordinator