
Content Manager 229
Match Word with Different Spellings or Special Characters
Tip: For information about using regular expressions to match obfuscations for
profane words, see “Block Messages with Profanity” on page 236.
Match Word with Variable Characters
Usage example
Match the word viagra and some of the obfuscations that
spammers use, such as:
• vi@gra
• v1agra
• v1@gra
• v!@gr@
Regex example
v[i!1][a@]gr[a@]
Notes
•
\W
is not included, so that other characters can appear
before or after any of the variants of viagra. For
example, the regex still matches viagra in the following
text:
viagra!! or ***viagra***
•
[i!1]
matches the characters i, !, or 1 in the second
character postition of the word.
Usage example
Match any URL that contains the text badmail.com, such as:
• badmail1.com
• badmail12.com
• badmail3.com
• badmail.junk.com
• badmail-junk.com
Regex example
badmail(\w.+%\-){0,25}\.com
Komentáře k této Příručce