Regular expressions are delivered as part of the premium policy template definitions. They allow you to create conditions that further refine email filtering by adding string search capability.
You can create a custom pattern resource from an existing regular-expression pattern by opening an associated policy template and copying-and-pasting the regex into the Regular Expression text box on the Compliance > Resources > Patterns/Custom/Add page. Also, when creating or modifying a content compliance policy, you can paste the regular expression directly into a Matches regular expression/does not match regular expression field on the Content Compliance Policy Condition page.
See“Regular expression descriptions”on page 111.
See“Premium pattern and regular-expression resources”on page 435.
Regular expression descriptions
The regular expressions delivered with the premium content compliance templates are shown in the following table.
Table 5-3 Regular expressions
Example Description Name 0123465789 222222222 841471235 Any digit other than a 4, 5 or 9 followed
by any 8 digits. ABA Routing Numbers
111 Configuring content compliance filtering Premium Content Compliance resources
Table 5-3 Regular expressions (continued)
Example Description
Name
a1234567 A1234567 Any sequence of a letter followed by 7
digits, immediately preceded and succeeded by a character that is not a letter, a digit, or underscore (_). CA Drivers License Numbers
Driver Licence Driver License dl # DL#
Looks for combinations of driv followed by characters followed by lic followed by characters OR dl # or dl# OR lic # or lic# all case insensitive.
Drivers License Keywords
12345-1234-12 Matches NDC Drug Code format
http://www.fda.gov/cder/ndc/ Drug Codes
123456789 987654321 Any sequence of 9 digits, immediately
preceded and succeeded by a character that is not a letter, a digit, or underscore (_).
NY Drivers License Numbers
a123456789012 A123456789012 Any sequence of a letter followed by 12
digits, immediately preceded and succeeded by a character that is not a letter, a digit, or underscore (_). Letter + 12 Digits Drivers License
Numbers
a12346578901 A12345678901 Any sequence of a letter followed by 11
digits, immediately preceded and succeeded by a character that is not a letter, a digit, or underscore (_). IL Drivers License Numbers
a1234567890123 A1234567890123 Any sequence of a letter followed by 13
digits, immediately preceded and succeeded by a character that is not a letter, a digit, or underscore (_). NJ Drivers License Numbers
IP Address ip address IP ADDRESS iP aDdress Looks for a case insensitive match of the
sequence 'IP Address.' IP Address
jedi?request= /erc/Poll?machinekey Looks for a case insensitive match of the
sequence 'jedi?request=' or '/erc/Poll?machinekey' GoToMyPC Activity
bob:fdshfjhf:78978:45:fdsf: Looks for sequences that match an
/etc/passwd format. /etc/passwd Format
bob:fdsfd:343:45454: 4343:122: 343:545
Looks for sequences that match an /etc/shadow format.
/etc/shadow Format
Configuring content compliance filtering Premium Content Compliance resources 112
Table 5-3 Regular expressions (continued) Example Description Name bob:3434:123456789012345 67890123456798012:123456 78901234567890123456798012: Looks for sequences that match a SAM
passwords format. SAM Passwords
import java.util.Collection; Looks for import followed by a class name
followed by a semicolon. Java Import Statements
public class Foo protected class Bar implements Foo
Optional public, private or protected followed by class or interface followed a class name by an optional extends or implements followed by a class name. Java Class Files
#include <stdio.h> #include "fdfdfd"
The sequence #include, followed by any number of spaces, followed by a '<' or ", followed by any number of letters, digits or underscores, followed by a < or ". C Source Code
Attribute VB_Name A case sensitive match of the sequence
Attribute followed by a space character followed by VB_Name.
VB Source Code
perl A case sensitive match of the sequence 'perl'
PERL Keywords
#! Looks for the sequence #!
PERL indicator
$something; $another; Looks for sequences that start with a $
followed by any letter or underscore then followed by any number of letters, digits or underscore.
PERL variable
AB123456 AB132456C Two upper case letters from the group
A-CEGHJ-NOPR-TW-Z followed by 6 digits, followed by an optional upper case letter (A through D), immediately preceded and succeeded by a character that is not a letter, a digit, or underscore (_).
UK National Insurance Number
AB1 AB12 AB123 AB1234 ABC1234 ABC1
Two or three upper case letters, followed by one to four digits, immediately preceded and succeeded by a character that is not a letter, a digit, or underscore (_).
UK Electoral Roll Numbers
113 Configuring content compliance filtering Premium Content Compliance resources
Table 5-3 Regular expressions (continued)
Example Description
Name
AB123456 AB132456C Any sequence of 10 digits, immediately
preceded and succeeded by a character that is not a letter, a digit, or underscore (_).
UK Tax ID Numbers
A1234501023ABCDE 5 characters or digits followed by a digit
followed by one of the inner groupings followed by a digit followed by 3 characters or digits followed by 2 characters.
UK Drivers Licence Numbers
A1234B 12345C 132456 A12345 An upper case letter or digit, followed by
4 digits, followed by an upper case letter or digit, immediately preceded and succeeded by a character that is not a letter, a digit, or underscore (_). UK Passport Numbers (Old Type)
A1234B 12345C 132456 A12345 Any sequence of 9 digits, immediately
preceded and succeeded by a character that is not a letter, a digit, or underscore (_).
UK Passport Numbers (New Type)
123-456-789 123 456 789 Matches numbers in the form
DDD-DDD-DDD or DDD DDD DDD Canadian Social Insurance Numbers
ABCD-EF-GH ABCD-EF-GH-IJK 4 characters followed by a dash followed
by 2 characters followed dash followed by 2 characters followed by an optional dash and 2 characters.
SWIFT Code Regex
912-71-1234 902-81-0234 Looks for a 9 followed by 2 digits,
followed by a dash, followed by a 7 or 8 followed by a digit, followed by a dash, followed by any four digits, immediately preceded and succeeded by a character that is not a letter, a digit, or underscore (_).
US ITIN