At 05:15 PM 10/1/98 -0400, you wrote:
> Does anyone have, or know of, a perl dirty word filter? I know I've
>seen one but cannot for the life of me remember where. Hate to reinvent
>the wheel.
Here's a code snippet from my oh-so-useful husband's collection of perl
tidbits.
--Tamra
---------------------------
sub filter_dirty {
foreach(%TEXT) {
$TEXT{$_} = "" if $TEXT{$_} =~
/fuck|shit|cunt|asshole|nigger|damn|crap|bitch|\btit\b|\btits\b|boob|bastard
|\bpussy\b|\bkike\b|nigger|\bfag\b|faggot|\bspic\b|\bwop\b|\bslut\b|\bwhore\
b|\bclit\b|\bdyke|\blesbo\b|wetback|\bchink\b|\bpiss|\bfart\b|\bfarthead\b/i;
$TEXT{$_} = "" if $TEXT{$_} =~ /\bdick/; # only in lower case.
}
}
------------------------------------------------------------
Hart Consulting http://www.hartcons.com/
Web Design & Engineering Studio Silicon Valley, California
650-967-6162 1-800-749-8032 (fax)
------------------------------------------------------------
____________________________________________________________________
--------------------------------------------------------------------
Join The Web Consultants Association : Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------