The following table replaces the table in Chapter 3, “Building Production Objects,” in the Examples section that describes using special characters for the isRegEx built-in qualification function:
Symbol |
Description |
---|---|
[ ] |
Brackets define a range of characters to match to a single character position. The example looks for any string that begins with the characters “abc” then has a “d”, “e”, or “f”, followed by a “g”. Example – “ |
. |
A period matches single character (except newline). Example – “ |
* |
An asterisk matches the preceding character 0 or more times. Example – “ |
^ |
A caret sign as the first character of a regular expression anchors the expression to the beginning of a line. Strings that start with the expression’s characters that follow the ^ fulfill the search criteria. Example – “ |
+ |
A plus sign following a regular expression repeats the expression one or more times. Example – “ |
– |
Specifies a range of characters.
|
$ |
A dollar sign as the last character of a regular expression anchors the expression to the end of a line. Strings that end in the expression’s characters that precede the $ fulfill the search criteria. Example – “ |
? |
Makes the preceding character optional. Example – “ |
{m} {m,} {m,u} |
Integers that specify the number of times
to repeat the preceding regular expression. “ Example – “ The expression “ |
( ) |
Round brackets group parts of a regular expression together. Round brackets can also create a “back reference”, which stores the part of the string matched by the part of the regular expression inside the parentheses.
Use parentheses to group other expressions. Operators like *, {}, and + can work on a regular expression enclosed in parentheses ( ) as well as on a single character. You can also make several characters optional by grouping
them together using round brackets, and placing the question mark
after the closing bracket. For example, “ |
\ |
You can use any of the above characters as a literal value by preceding the character with a backslash. The backslash works on only one character at a time. Example – “
|