Specifications
Syntax for Resource Definitions
Special Characters in String Parameters
When using special characters such as quotation marks (") or backslashes ( \ )
in a string parameter to qualify an event, preceded the special characters with
a backslash ( \ ).
The following example shows how to specify a string parameter to match a
window title containing quotation marks.
{ Title="\"OK\"" }
Regular Expressions
Regular expressions are patterns in text strings that are formed by normal
characters and special characters (also known as meta-characters). Regular
expressions allow you to search for patterns instead of fixed strings. For
example, the regular expression [akm] matches either an a, k, or m. The
brackets around the characters are special characters.
Period ( . )
The period ( . ) matches any character except the newline control character.
The regular expression .ide matches hide, side, wide, and so on.
Square Brackets [ ]
A set of characters enclosed in square brackets [ ] is a one-character regular
expression that matches any of the characters in the set. The regular
expression [abcde] matches either an a, b, c, d, or e.
Within square brackets, you can indicate a range of characters with a dash (-).
For example, [a-z] matches any lowercase letter.
When used as the first character of a set, the caret defines a regular
expression matching any character except those in the set. For example, [^a-
e] matches any character except a, b, c, d, or e.
Plus Sign (+)
A one-character regular expression followed by a plus sign (+) matches one or
more occurrences of the regular expression. For example, [a- z]+ matches one
or more lowercase characters.
Asterisk (*)
A one-character regular expression followed by an asterisk (*) matches zero
or more occurrences of the regular expression. For example, [a- z]* matches
zero or more lowercase characters.
116 BTStudio Administration Guide