This section describes the Perl-compatible regular expressions that can be used in content filtering policies.
Table: Regular expression metacharacters
Period: Matches any single character of the input sequence.
Circumflex: Represents the beginning of the input line. For example, ^A is a regular expression that matches the letter A at the beginning of a line. The ^ character is the only special character allowed at the beginning of a regular expression or after the ( or | characters.
Dollar sign: Represents the end of the input line. For example, A$ is a regular expression that matches the letter A at the end of a line. The $character is the only special character allowed at the end of a regular expression or before the ) or | characters.
Note that this metacharacter cannot be used for line-by-line matching in a message body.
Asterisk: Matches zero or more instances of the string to the immediate left of the asterisk. For example, A* matches A, AA, AAA, and so on. It also matches the null string (zero occurrences of A).
Question mark: Matches zero or one instance of the string to the immediate left of the question mark.
Plus sign: Matches one or more instances of the string to the immediate left of the plus sign.
Escape: Turns on or off the special meaning of metacharacters. For example, \. only matches a dot character. \$ matches a literal dollar sign character. Note that \\ matches a literal \ character.
Pipe: Matches either expression on either side of the pipe. For example, exe|com|zip matches exe, com, or zip.
Brackets: Inside the brackets, matches a single character or collating element, as in a list. Characters within brackets are not case sensitive.
The string inside the brackets is evaluated literally, as if an escape character (\) were placed before each character in the string.
If the initial character in the bracket is a circumflex (^), then the expression matches any character or collating element except those inside the bracket expression.
If the first character after any potential circumflex (^) is a dash (-) or a closing bracket (]), then that character matches only a literal dash or closing bracket.
Parentheses: Groups parts of regular expressions, which gives the string inside the parentheses precedence over the rest.