Creating Patterns in XML File
You can either create a pattern from the user interface, or you can create patterns in an XML file and import the file using the import feature.
While preparing a file for importing patterns, keep in mind that:
-
Only XML files can be used to import patterns.
-
You can name the file anything you want.
-
Elements should be defined in the order specified in the pattern file exported from the application.
-
Elements and values of elements in the XML file are case-sensitive.
-
For user-created patterns, the isDefault element should always be set to no. Likewise, for default patterns, the isDefault element should be always set to yes.
-
If you are importing a pattern that already exists in the system, your existing pattern will be overwritten by the import process.
The following table lists the names of the properties as they appear in the file and on the UI. For the description of each field, see Creating Patterns.
Name on the UI |
Name in the file |
---|---|
Name |
name |
Description |
description |
Active |
isActive |
Default |
isDefault |
Masking character |
maskingCharacter |
Javascript regular expression |
javascriptRegularExpression |
Java regular expression |
javaRegularExpression |
Number of characters to unmask from right |
numOfCharsToUnmaskFromLeft |
Number of characters to unmask from left |
numOfCharsToUnmaskFromRight |
Apply Luhn algorithm |
applyLuhnAlgorithm |
A sample pattern looks like:
Related Topics