| Regexp-Common-profanity_us documentation | view source | Contained in the Regexp-Common-profanity_us distribution. |
Regexp::Profanity::US - Simple functions for detecting U.S. profanity
use Regexp::Profanity::US; my $degree = 'definite'; # or 'ambiguous'; my $profane = profane ($string, $degree); my @profane = profane_list($string, $degree);
This module provides an API for checking strings for strings containing various degrees of profanity, per US standards.
Check $string for profanity of degree $degree, where
$degree eq 'definite' or $degree eq 'ambiguous'
For positive matches, returns TRUE, with TRUE being the first match in the string.
For negative matches, FALSE is returned.
The sub returns a list of all profane words found in $string, or an
empty list if none were found.
profane() and profane_list
There is another module supporting profanity checking, namely Regexp::Common::profanity, but many of the profane words were of European origin and I did not find them profane at all from an American standpoint.
T. M. Brannon, tbone@cpan.org
Refactored by Matthew Simon Cavalletto, evo@cpan.org.
| Regexp-Common-profanity_us documentation | view source | Contained in the Regexp-Common-profanity_us distribution. |