Help with regex for bots
Posted: Thu Jun 22, 2006 11:33 am
Hi everyone,
I've had this flood of spambots on my network recently and I've been trying to write a regex that is going to kill them but not kill some other users.
Example bot nicks:
philipmM54
josieafF22
markasP07
etc
I want a regex that is going to kill nicknames that have a capital letter and 2 numbers in the last part of the nickname killed.
The regex I wrote is:
[A-Z]{1}[0-9]{2}!
And I've tried:
^[A-Z]{1}[0-9]{2}!
and also:
^\w+[A-Z]{1}[0-9]{2}!
All will kill the bots but also kill nicknames such as
snowman01
Scrawl07
Tunix21
Any ideas? I do not want to kill nicknames that end in 2 numbers but 1 capital AND 2 numbers.
By the way I am entering these by the /spamfilter command not by putting them in the .conf file
Any help is muchly appreciated!
I've had this flood of spambots on my network recently and I've been trying to write a regex that is going to kill them but not kill some other users.
Example bot nicks:
philipmM54
josieafF22
markasP07
etc
I want a regex that is going to kill nicknames that have a capital letter and 2 numbers in the last part of the nickname killed.
The regex I wrote is:
[A-Z]{1}[0-9]{2}!
And I've tried:
^[A-Z]{1}[0-9]{2}!
and also:
^\w+[A-Z]{1}[0-9]{2}!
All will kill the bots but also kill nicknames such as
snowman01
Scrawl07
Tunix21
Any ideas? I do not want to kill nicknames that end in 2 numbers but 1 capital AND 2 numbers.
By the way I am entering these by the /spamfilter command not by putting them in the .conf file
Any help is muchly appreciated!