Subexpressions, Regular expressions using special characters – Visara Master Console Center Scripting Guide User Manual
Page 55
Chapter 4 Regular Expressions
Scripting Guide
55
[^.]
Match anything EXCEPT a dot.
[^A-Z]
Match anything EXCEPT an upper case letter.
Subexpressions
Some(Other)*Expression
This expression example demonstrates a subexpression. The parenthesis
‘( )’ contain a subexpression. Subexpressions are useful for two purposes:
Specifying special characters after the regular expression.
Some actions can be configured to allow specification of subexpression
contents within the arguments to the action.
The asterisk ‘*’ in this example searches for "zero or more occurrences" of
the preceding expression. Thus, this example matches "SomeExpression",
"SomeOtherExpression", "SomeOtherOtherExpression", and so on.
Regular Expressions Using Special Characters
Some.Expression
This regular expression includes a special character—the period. In
regular expressions, a period matches any one character. Thus, this
expression will match "Some Expression", "Some-Expression",
"SomeXExpression", and so on.
Some.*Expression
This is a simple use of an asterisk. An asterisk means match zero or more
occurrences of the previous item. Item examples are a character, a
bracket expression, or a subexpression. This expression matches "Some"
and "Expression" separated by zero or more characters—any characters.
Thus, "SomeExpression", "SomexyzzyExpression" and "Some-Expression"
all match.