- # look for a few of the common ones with spaces and stuff
- if ($s =~ /F[\s\W]*U[\s\W]*C[\s\W]*K/) {
- return "FUCK";
- } elsif ($s =~ /C[\s\W]*U[\s\W]*N[\s\W]*T/) {
- return "CUNT";
- } elsif ($s =~ /W[\s\W]*A[\s\W]*N[\s\W]*K/) {
- return "WANK";
- } elsif ($s =~ /C[\s\W]*[0O][\s\W]*C[\s\W]*K/) {
- return "COCK";
- } elsif ($s =~ /S[\s\W]*H[\s\W]*[I1][\s\W]*T/) {
- return "SHIT";
- } elsif ($s =~ /P[\s\W]*[I1][\s\W]*S[\s\W]*S/) {
- return "PISS";
- } elsif ($s =~ /B[\s\W]*[O0][\s\W]*L[\s\W]*L[\s\W]*[O0][\s\W]*[CK]/) {
- return "BOLLOCKS";
+ for (split(/\b/, $s)) {
+ push @out, $_ if $badword->in($_);