Objects : Objects > Custom Objects : Objects > Custom Objects > Data Patterns : Syntax for Regular Expression Data Patterns

Syntax for Regular Expression Data Patterns
The general pattern requirements and syntax for creating data patterns depends on the pattern-matching engine that you enable: classic or enhanced (default).
Requires 7 literal characters, which cannot include a period (.), an asterisk (*), a plus sign (+), or a range ([a-z]).
Allows you to use the i option on a sub-pattern.
Example: ((?i)\bconfidential\b) matches ConfiDential
The regular expression syntax in PAN-OS® is similar to traditional regular expression engines but every engine is unique. The Classic Syntax and Enhanced Syntax tables describe the syntax supported in the PAN-OS pattern-matching engines.
Classic Syntax
Example: (abc)?
Example: (abc)*
Example: (abc)+
Note: 
Example: ((bif)|(scr)|(exe)) matches bif, scr, or exe.
Example: [c-z] matches any character between c and z inclusive.
Example: [abz] matches any of the specified characters—a, b, or z.
Example: [^abz] matches any character except the specified characters—a, b, or z.
Example: {10-20} matches any string that is between 10 and 20 bytes inclusive. You must specify this directly in front of a fixed string and you can use only a hyphen (-).
The ampersand (& ) is a special character so, to look for & in a string, you must use &amp.
Enhanced Syntax
The enhanced pattern-matching engine supports all of the Classic Syntax as well as the following syntax:
Example: \s matches a space, tab, line break, or form feed.
Example: \d matches 0.
Example: \w\w\w matches PAN.
Example: \v matches a vertical white space character.
Example: \h matches a horizontal white space character.
Example: a{2} matches aa.
{n,m} matches from n to m times.
Example: a{2,4} matches aa, aaa, and aaaa
{n,} matches at least n times.
Example: a{2,} matches aaaaa in aaaaab.
Example: Given the string abc, ^a matches a, but ^b doesn’t match anything because b doesn’t occur at the start of the string.
Example: Given the string abc, c$ matches c, but a$ doesn’t match anything because a doesn’t occur at the end of the string.
Change the behavior of a sub-pattern. Enter (?<option>) to enable or (?-<option>) to disable.
Example: ((?i)\bconfidential\b) matches ConfiDential.
Make ^ and $ match at the beginning and end of lines.
Make . match anything, including line break characters.
Objects > Custom Objects > Data Patterns