Info > Feedback and Suggestions

Profanity filter insanity

<< < (5/5)

Calico Jack:

--- Quote from: Clara Skyborn on July 31, 2013, 02:10:22 pm ---

Because there's no way to whitelist certain words while continuing to block parts of them. If Uranus were allowed, so would be any string containing *anus*. Sorry, I think it's a lovely planet/titan, and I wish we could honor it/him properly.


--- End quote ---


don't know what language your using for matching but using as approximate matching as possible
#! perl
 /\b(U|u)(\w{1}anus)\b/

this will match on any word that starts with a "u" followed by any alphabetic character so "Uzanus"  will also match but it's limited to 1 character, whereas

/\b\w+anus\b/

which is what you appear to be using which will match any word containing "anus"



Navigation

[0] Message Index

[*] Previous page

Go to full version