Cisco Cisco Email Security Appliance C160 Mode D'Emploi

Page de 400
 
6-17
Cisco IronPort AsyncOS 7.6 for Email Advanced Configuration Guide
OL-25137-01
Chapter 6      Using Message Filters to Enforce Email Policies
Note
When matching an empty string, do not use 
“”
 as that actually matches all strings. Instead use 
“^$”
. For 
an example, see the second example in 
.
It is also important to remember that if you want to match a literal period, you must use an escaped period 
in the regular expression. For example, the regular expression 
sun.com
 matches the string 
thegodsunocommando
, but the regular expression 
^sun\.com$
 only matched the string 
sun.com.
Technically, the style of regular expressions used are Python re Module style regular expressions. For 
a more detailed discussion of Python style regular expressions, consult the Python Regular Expression 
HOWTO, accessible from
:
 
http://www.python.org/doc/howto/
Regular Expression and Non-ASCII Character Sets
In some languages, the concepts of a word or word boundary, or case do not exist. 
Complex regular expressions that depend on concepts like what is or is not a character that would 
compose a word (represented as “
\w
” in regex syntax) cause problems when the locale is unknown or if 
the encoding is not known for certain. 
n Tests
Regular expressions can be tested for matching using the sequence 
==
 and for non-matching using the 
sequence 
!=
. For example: 
Case-sensitivity
Unless otherwise noted, regular expressions are case-sensitive. Thus, if your regular expression is 
searching for 
foo
, it does not match the pattern 
FOO
 or even 
Foo
.
rcpt-to == "^goober@dev\\.null\\....$" (matching)
rcpt-to != "^goober@dev\\.null\\....$" (non-matching)