Content Examination - Regular Expressions

This article contains information on using punctuation in the "Word/Phrase Match List" for Content Examination definitions, detailing options for treating punctuation as simple, advanced, or exact matches.

A regular expression (regex or regexp) is a sequence of characters used to search for text strings or combinations of the regex in larger text. Multiple regular expressions can be added to a Content Examination definition, used to search for matching text within scanned mail. If we detect the regex in a message, the action specified in the definition is taken.

 

Custom regular expressions are not supported or created with Mimecast support.

Adding a Regular Expression to a Definition

To add a regular expression to a definition:

  1. Log on to the Mimecast Administration Console.
  2. Click on the Policies | Gateway Policies menu item.
  3. Hover over the Definitions button. A list of the definition types is displayed.
  4. Click on the Content Examinations definition type from the list. The list of definitions is displayed.
  5. Either click on the:
  • Definition to be changed.
  • New Content Definition button.
    •  
  1. Click on the Insert button.
  2. Click on the Regular Expression menu item.
  3. Complete the Policy Definition dialog as follows:

 

Field / Option Description
Line Score Specify a regular expression value that is compared to the "Activation Score" in the definition.
Append If selected, the reference dictionary is placed at the bottom of the "Word/Phrase Match List.". If unselected, it is placed at the top of the list.
Regular Expression Add the regular expression.

If required, the Mimecast Support team can offer basic guidance on regular ex- pressions, as outlined in the Phrase Match Examples page.

Comment

Add any notes that refer to the regular ex- pression. These are only displayed in the "Word/Phrase Match List" field prefixed by a hash symbol (#). All comments are ignored when examining messages for matches.

 

  1. Click on the Save and Exit button. If you create a regex entry (containing a recognized greedy regex) the following warning message appears:

 

 

The following regex entries are defined as being greedy, each separated below for readability by “” “.+” “(.+)” “(.)+” “.*” “(.*)” “(.)*” “.?” “(.?)” “(.)?” Additionally, the following, where n and m are digits: “.{n}” “.{n,m}” “.{n,}”

  1. Click OK and this creates a new Audit Log entry.
  2. Repeat steps 7-10 to add any additional regular expressions to the definition.

See Also...

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.