TipAlthough keywords or expressions can be created during policy creation, Trend Micro recommends creating keywords or expressions
before you begin creating policies.
|
Regular Expression
|
Description
|
. (dot)
|
Any character (byte) except newline
|
x
|
The character 'x'
|
\\
|
The character '\'
|
\a
|
The alert (bell) character (ASCII 0x07)
|
\b
|
|
\f
|
The form-feed character (ASCII 0x0C)
|
\n
|
The newline (line feed) character (ASCII 0x0A)
|
\r
|
The carriage-return character (ASCII 0x0D)
|
\t
|
The normal (horizontal) tab character (ASCII
0x09)
|
\v
|
The vertical tab character (ASCII 0x0B)
|
\n
|
The character with octal value 0n (0 <=
n <= 7)
|
\nn
|
The character with octal value 0nn (0 <=
n <= 7)
|
\mnn
|
The character with octal value 0mnn (0 <=
m <= 3, 0 <= n <= 7)
|
\xhh
|
The character with a hexadecimal value 0xhh,
for example, \x20 means the space character
|
Expression | Matches |
[abc] | a, b, or c |
[a-z] | a through z |
[^abc] | Any character except a, b, or c |
[[:alpha:]] | Any alphabetic character (see below) |
Character class | Description |
[:alpha:] | Alphabetic characters |
[:digit:] | Digits |
[:alnum:] | Alphabetic characters and numeric characters |
[:cntrl:] | Control character |
[:blank:] | Space and tab |
[:space:] | All white space characters |
[:graph:] | Non-blank (not spaces, control characters, or the like) |
[:print:] | Like [:graph:], but includes the space character |
[:punct:] | Punctuation characters |
[:lower:] | Lowercase alphabetic |
[:upper:] | Uppercase alphabetic |
[:xdigit:] | Digits allowed in a hexadecimal number (0-9a-fA-F) |
Expression | Description |
^ | Beginning of line |
$ | End of line |
Expression | Description |
R? | Matches R, once or not at all |
R* | Matches R, zero or more times |
R+ | Matches R, one or more times |
R{n} | Matches R, exactly n times |
R{n,} | Matches R, at least n times |
R{n,m} | Matches R, at least n but no more than m times |
Expression | Description |
RS | R followed by S (concatenation) |
R|S | Either R or S |
R/S | An R but only if it is followed by S |
(R) | Grouping R |
Shorthand | Description |
{D} | [0-9] |
{L} | [A-Za-z] |
{SP} | [(),;\.\\<>@\[\]:] |
{NUMBER} | [0-9]+ |
{WORD} | [A-Za-z]+ |
{CR} | \r |
{LF} | \n |
{LWSP} | [ \t] |
{CRLF} | (\r\n) |
{WSP} | [ \t\f]+ |
{ALLC} | . |
Meta-symbol | Description |
\s | [[:space:]] |
\S | [^[:space:]] |
\d | [[:digit:]] |
\D | [^[:digit:]] |
\w | [_[:alnum:]] |
\W | [^_[:alnum:]] |
Expression | Description |
"C/C++" | Match string C/C++ (does not include double-quotes) |
"Regular\x20Expression" | Match string Regular Expression (does not include double-quotes), where \x20 means the space character. |
"[xyz]\"foo" | Match the literal string: [xyz]"foo |