beautypg.com

Use multiple regular expressions for a filter – Google Message Security for Google Apps Administration Guide User Manual

Page 235

background image

Content Manager

235

Use Multiple Regular Expressions for a Filter

You can enter up to three regular expressions for a filter—one expression per filter
rule. You might want to enter multiple regular expressions for the following
reasons:

To avoid the regex complexity or word list limitation

If you your regular expression exceeds the component (complexity) limitation
for a rule, you can enter two or three shorter expressions. For example, if your
expression for a word list contains more than 48 words, you can enter two or
three shorter lists, for a total of up to 144 words.

For details about components in regular expressions, see “Content Manager
Support for Regular Expressions” on page 224.

To increase the filter’s effectiveness

Often, you can increase the number of patterns a filter matches by creating
multiple regular expressions. For example, to match obfuscations for the word
viagra, you can create up to three different regular expressions for the filter,
each of which matches different types of obfuscations, as shown in the
following table:

This regular expression...

Matches these types of
obfuscations...

v[i!1][a@][g9]r[a@]

vi@gra

v1agra

v1@gra

via9ra

v[\W_]{1,3}i[\W_]{1,3}a[\W_]{1,3}g[\W_]{1

,3}r[\W_]{1,3}a{1,3}

v**i**a**g**r**a

v_i_a_g_r_a

v~i~a~g~r~a

v/i/a/g/r/a

v i a g r a

\\/v{1,5}i{1,5}a{1,5}g{1,5}r{0,5}a{0,5}

\/iagra

\/iiaaggrraa

vviiiaaaggrrraaa

viag