The steps for creating a regex pattern group below use the example of a company that is creating a pattern group for PII that includes:
- The predefined patterns France Driver's License Number, France National ID Card, and France Passport Number
- The new pattern Company ID, a 6 digit numerical pattern.
To add a regex pattern group:
- In the Smart Classification screen, click Patterns in the menu bar, and then click Add pattern group.
The New Pattern Group dialog box opens. - Enter a Group name.
- Click Add pattern group.
The new pattern group name is added above the list of patterns.
- Click the pattern group name.
At this point, the pattern group is empty. - Click Add pattern to group.
A drop-down list opens. It lists existing pattern groups for you to choose and enables you to add new pattern groups and include them.
- Click France Driver's License Number.
The dialog box closes and France Driver's License Number is added to the list for the group. Another Add pattern to group link appears below it.
- Click the Add pattern to group link and click France National ID Card.
France National ID Card is added to the group. - Click the Add pattern to group link below it, and click France Passport Number.
Now all three of the predefined patterns are added to the PII pattern group.
- Below the three patterns, click Add pattern to group.
- To create the new Company ID pattern, click + Pattern at the bottom of the drop-down list.
A New Content Classification Pattern dialog box opens. The checkbox Add to PII Group is automatically checked to enable you to add the pattern and include it in the group at the same time.
- In Pattern name, enter Company ID.
- In Regular Expression (RegEx) enter [0-9]{6}.
- To open a test box, click Test the pattern.
Notice that the box has two tabs: Default and PatternMatch which correspond to the Default and Solr Pattern Match classifiers. Test it in the tab that corresponds with the classifier you plan to use, or test it in both. For descriptions of the classifiers, see Guide to Classifiers. - Type text that includes a 6-digit number into the Test the pattern box.
- To test the pattern, click Check.
If the test is successful, the dialog box is similar to the following, with the 6-digit number highlighted and a message below it indicating the number of matches.
- If the test is successful, click Add pattern.
The pattern is added to the pattern group.
It is also added to the list All Patterns, so you can add it to a rule individually or as part of the pattern group.