Including regular expressions

Regular expressions (RegEx) are a powerful way of matching a sequence of simple characters. Using regular expressions in your dictionaries enables you to specify precise phrase matching for your email.

Note:

Regular expressions are not case-sensitive.

There is a limit on the number of regular expressions that can be included in lexical rules for each policy. If your dictionaries include a large number of regular expressions, it might restrict the ability of the service to process your email. Lexical rules that include a large number of regular expressions cannot be saved.

For syntax and some examples, see Standard Regular Expression Strings.

Steps

  1. Click Attach phrase.
  2. Click Regex view.
  3. Enter the regular expression in the Regex field.
  4. Enter a description for the regular expression. This description appears in the dictionary items list with “regex” next to it to signify that a regular expression was defined.
  5. Assign a score to the phrase, and indicate which parts of the message you want to apply it to.
  6. In the Test against field, enter some text that can test whether your regular expression is well-formed and meets your requirements, then click Test regex.
  7. When you are happy with the regular expression, click Submit.
    Note: To return to the simple substring search or complex multi-word search options, click Simple phrase view.