Applicable versions and levels
Windows versions: V5.0L20 or later
A
You can use the following notations as regular expressions:
Regular expression | Meaning |
---|---|
. | Denotes any character. |
* | Denotes 0 or more repetitions of the preceding character (including regular expressions). |
^ | Denotes the beginning of a line. |
$ | Denotes the end of a line. |
[<string>] | Denotes any character used in the string. |
[^<string>] | Denotes any character other than the characters used in the strings. |
[<character a>-<character b>] | Denotes any character from <character a> to <character b>. |
The regular expressions are as follows:
Regular expression | Meaning |
---|---|
abc | Denotes a string containing "abc". Example matches are "aabc" and "abcd". |
abc.ef | Denotes that any character can be used between "abc" and "ef". Example matches are "abcdef" and "abc5ef". |
a*b | Denotes 0 or more repetitions of the character "a". Example matches are "b", "ab", "aab", and "aaab". |
.* | The combination of "." (which denotes any character) and "*" (which denotes 0 or more repetitions of the preceding character) can represent any string. |
^abc | Indicates that the line begins with "abc". Example matches are "abcdef" and "abcxyz". |
xyz$ | Indicates that the line ends with "xyz". Example matches are "123xyz" and "ABCxyz". |
3001[IWEH] | [IWEH] denotes the character I, W, E, or H. Example matches are "3001I", "3001W", "3001E", and "3001H". |
3500[^IN] | [^IN] denotes a character other than I and N. Example matches are "3500a" and "3500n", and example non-matches are "3500I" and "3500N". |
[0-9] TIMES | [0-9] denotes any character from 0 to 9. Example matches are "0 TIMES" and "2 TIMES". |
Example settings: Specifying source names for monitoring events
Source names of events to be monitored: "CheckFile EventA"
Source names of events to be monitored: "CheckLog EventA"
Source names of the events that are not to be monitored: "DiskCheck EventB"
Defining a string that contains the string "Check" and ends with "A"
Definition example: "Check.*A"
Bad definition example: "Check*A" (0 or more repetitions of "k", followed by "A")
Point
The regular expression "*" denotes 0 or more repetitions of the preceding character. It does not denote "any string".
Defining a string that ends with "EventA"
Definition example: "EventA$"
Defining a string that begins with "Check"
Definition example: "^Check"
Notes
If using the character ".", "*", "^", "$", "[", or "]" as a general character and not as a special character in a regular expression, add "\" before the character. (Examples: "\.", "\*", "\^")
If using "?", "(", ")", "|", "+", or "\" in addition to the above characters, add "\" before the character.
In a string enclosed with "[" and "]", the character "$" denotes the literal character "$" and not the regular expression character.
The regular expression ".*" has the same meaning regardless of whether you set it at the beginning or omit it.
For example, both ".*error occurred" and "error occurred" will match strings that contain "error occurred". Thus, if the meaning is the same regardless of whether you set a regular expression character, do not use the regular expression character because processing to compare strings may be faster without it.