Andrew Gaffney wrote:
I'm trying to come up with a regex for my IRC bot that detects 1337 (in order to kick them from the channel). I can't seem to come up with one that will have few false positives but also work most of the time. Has anyone done something like this before? Does anyone have any suggestions?


Write a converter to translate common "symbols" to the correct letter. If the translated "word" is a valid dictionary word, flag it.


[EMAIL PROTECTED]
3 => E
X => X
@ => A
m => M
P => P
1 => L
e => E

[EMAIL PROTECTED] => EXAMPLE

EXAMPLE is a dictionary word, so [EMAIL PROTECTED] must be leet since the conversion rules produced meaningful results.

It's not perfect, but should work with very few if any false positives.

Randy.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to