Creating regular expressions
This topic provides general information about creating regular expressions. Click here for Examples-of-regular-expressions-when-used-with-PATROL-objects-and-pathnames.
General conventions for using regular expressions
Character | Description |
---|---|
. (period) | matches any single character |
* (asterisk) | matches zero or more instances of the previous pattern item |
+ (plus sign) | matches one or more instances of the previous pattern item |
? (question mark) | matches zero or one instance of the previous pattern item |
(\ ) (backslash and parenthesis) | groups a subpattern |
| (backslash and vertical bar or pipe) | alternation |
[ ] (brackets) | delimit a set of characters |
^ (caret) | anchors the pattern to the beginning of the string |
$ (dollar sign) | anchors the pattern to the end of the string |
\& (backslash and ampersand) | connects two or more regular expressions as an 'AND' operator. |