Regular Expressions

Regular expressions (RegEx) are used within the Compliance Filter to extract information from a string. Thus, it is possible to recognize and filter patterns in the subject or other components of an email.

The system automatically adds “.*” to the beginning and the end of the subject as well as to the email body and header.


Within the Compliance Filter, you can use Perl Compatible Regular Expressions. Other libraries are not supported (for more information, see: In addition, there are special restrictions that are explained next.

Example: Using regular expressions in the Compliance Filter

Users often received emails with the word “porn” in the subject. A filter rule was defined to mark them as spam. Recently, an increased volume of spam emails using leetspeak to bypass this filter was observed. For example, incoming emails with the subject “p0rn” were not tagged by the Compliance Filter. In this case, the use of a regular expression is more effective:

Figure 1: Use of a regular expression in the Compliance Filter

The dot matches any character. The filter is not limited to an “o” in this place, but reacts to any letter, digit and special character.