On Thu, Mar 24, 2005 at 02:25:19AM -0600, Andrew Gaffney wrote:
> Randy W. Sims wrote:
> >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.
> 
> Thanks for yet another very interesting approach.

Check out Lingua::31337 on CPAN.  That C really does stand for
comprehensive.

It works the other way around, ie it converts normal text to 31337, but
you coud probably reverse the conversions it uses.  Best of all, it's
written by the founder of this list (hi Casey!) but I don't think it has
ever been plugged here.  It's about time that was remedied.

I'm sure Casey would be happy to accept a patch to add a 313372text
function.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
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