
Regular expressions are used to perform string matching. See the following tables for some common examples of regular expressions.
Regular expressions are a powerful string matching tool. For this reason, it is recommended that an administrator who chooses to use regular expressions should be familiar and comfortable with regular expression syntax. Poorly written regular expressions can have a negative performance impact. Trend Micro’s recommendation is to start with simple regular expressions that do not use complex syntax. When introducing new rules, use the backup action and observe how PortalProtect applies your rule. When you are confident that the rule has no unexpected consequences, you can change the action.
|
Element |
What it Means |
Example |
|
. |
The dot or period character represents any character except new line character. |
do. matches doe, dog, don, dos, dot, and so on. d.r matches deer, door, and so on. |
|
* |
The asterisk character means zero or more instances of the preceding element. |
do* matches d, do, doo, dooo, doooo, and so on. |
|
+ |
The plus sign character means one or more instances of the preceding element. |
|
|
? |
|
|
|
() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|