Page 1 of 1

Help with very simple regexp

Posted: Thu Oct 06, 2005 3:58 pm
by Speed
Hello and thank you for any kind of help.
I'm a total nooby in the regexps case, so I'm here for help.
I want to gline all users trying to connect with nicks consisting in only numbers like:

Code: Select all

Client connecting on port 6667: O21942941 (O21942941@82-166-230-177.barak.net.il) [clients]
All my newby attempts to match the nick with ^[0-9]+$ or ^[[:digit:]]+$ or ^\d+$ failed due to my poor understanding of posix regular expressions.

Someone please enlight me :(

Thank you.

Posted: Thu Oct 06, 2005 4:21 pm
by Syzop
The idea is good, but spamfilter target u is not only matched against the nick, but against: nick!user@host:realname.

So it would have to be something like: ^\d+!\d+@

Posted: Thu Oct 06, 2005 5:11 pm
by Speed
Silly me :oops:

I added your patter and I will keep an eye on it.

Thank you very much for your help

Posted: Thu Oct 06, 2005 6:07 pm
by Stealth
You also need to take in mind that the first letter of that nick is a letter, but a number. Nicks cannot start with numbers.

Posted: Thu Oct 06, 2005 6:34 pm
by Speed
True, first letter is the letter "O" not a zero, but that is a simple-enough modification to do to the pattern.

Anyway, I've just found out that my spamfilter got obsolete in the moment I've loaded the anti-random module :lol:

Thank you for the good thought anyway