Page 1 of 1

One Word Regex

Posted: Thu May 03, 2007 8:54 am
by Unholies
Hello i come across with a kind of bot attack.

Bots only writes one word. like " a "

Such As;

<k_nDm> a

How can i write a regex for only one word? but if the word has other words next to it, it will not block the message...

so if someone writes "ab" then it wont be blocked.

anybody can help?

Posted: Thu May 03, 2007 11:38 am
by Jobe
So basically you want to block 1 character only messages?

The regular expression to do that would be "^.$" (without the quotes) where that will match any 1 character message where the 1 character can be anything including spaces and special characters.

Posted: Thu May 03, 2007 7:42 pm
by Unholies
That didnt work...

Seems Like there is a space before a

I am really a newbie about this :(

Posted: Thu May 03, 2007 10:15 pm
by Jobe
If its always a space in front try somthing like "^..$" or "^ .$"

Posted: Mon May 21, 2007 5:42 am
by LimE
not sure but it will be ok :P

/spamfilter + cpnN block - test (^\s.\s$|^\s.$|^.\s$|^.$)






--------------------

IRC Network [ irc.globalogc.org ]
Website [ http://www.globalogc.org ]
Email [ [email protected] ]

Posted: Mon May 21, 2007 5:55 am
by Stealth

Code: Select all

^\s?.\s?$