Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Robust Anti-Swear scriptby spudzeppelin (Pilgrim) |
on Jul 31, 2001 at 01:31 UTC ( [id://100979]=note: print w/replies, xml ) | Need Help?? |
Check out the new Regexp::Common module that Damian Conway released, and IIRC japhy is now maintaining. It contains a built-in $RE{profanity} that you can match against without having to put the terminology in your script (and without having to try to define your own canon for what is "profane"). If you really wanted to, you could craft an extension (based on the way it's written) to the tree to implement the degree of comprehensiveness you desire. The paper describing it in detail is actually in the proceedings of TPC (which just ended Friday). You may also want to watch how comprehensive you are trying to make this. Otherwise, you could find yourself filtering out things like i18n n d4m n l10n (for some legitimate use of "d4m"). Spud Zeppelin * spud@spudzeppelin.com
In Section
Seekers of Perl Wisdom
|
|