Reference: |
Some FOCUS features accept regular expressions as input.
A regular expression is a string containing a tagged expression. A tagged expression is a portion of the string that contains a pattern that will be matched against an actual character string.
This section summarizes how to create a regular expression. More information about regular expressions can be found on the Web.
Tagged expressions must be enclosed in parentheses. The backslash character (\) is a special character in tagged expressions. If a group ID actually contains a backslash character, you indicate that you want the backslash character to be treated as a normal character by entering two successive backslash characters (\\).
The following can be used to create the tagged expression:
Matches abc anywhere within the string.
Matches abc anywhere within the string, but the parentheses act as a tag.
Defines a character class (or set) that matches any one of the characters in the class. For example, [abc] matches the character a or b or c. The expression [x-y] matches any character from x to y.
Matches any single character except newline.
Matches any word character string (alphanumeric plus "_").
Matches any non-word character.
Matches any whitespace character.
Matches any non-whitespace character.
Matches any digit.
Matches any non-digit character.
Matches a tab character.
Matches a return character.
Matches a formfeed character.
Matches an escape character.
Matches a word boundary or a backspace. For example, test\b matches test, but not testing. However, \b matches a backspace character when specified inside a class (that is, [\b]).
Requires that there is no word boundary. hello\B matches hello, but not hello there.
Matches characters only at the beginning of the string. For example, ^abc matches abc at the beginning of the string.
Matches characters only at the end of the string. For example, abc$ matches abc at the end of the string.
Specifies alternative matching characters. For example, a|b matches either a or b. This metacharacter can also be used with words, for example, abc|def.
Matches a character that is not in the set. [^abc ]+ will match such strings as hello, test, and perl.
Is the escape character. For example, \* matches the * character. Use the backslash (\) character to escape (remove the special meaning of) characters that have significance in a regular expression.
Ignores case. For example, (a(?i)b|c) matches aB, c, and C.
You can follow any character, wildcard, or series of characters and/or wildcards with a repetition indicator:
Matches 0 or more occurrences of the character sequence.
Matches 1 or 0 occurrences of the character sequence.
Matches 0 or more occurrences of the character sequence or the shortest match.
Is the repetition modifier.
Matches exactly n occurrences of the character sequence.
Matches at least n occurrences of the character sequence.
Matches at least n but not more than m occurrences of the character sequence.
|
Information Builders |