Just to add what kvale mentioned, there is also Regex::Common, which also has a profanity regex built-in, but the wordset is different from what I know.
You didn't discuss why you want to filter "profanity", but take a look at this and consider the possible consequences before liberally applying a profanity filter.
In reply to Re: regex for swear filter
by Corion
in thread regex for swear filter
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |