Regular expressions

Regular expressions contain strings of characters and metacharacters specified by the user to find predetermined key words in a log file. Metacharacters are symbols that take the form of grammatical punctuation, numbers, and the alphabet. Metacharacters are used with character strings to increase the probability of finding keywords in a specified log file. Regular expressions are specified in the Service Details tab for services. The parameters for the regular expressions are specified in the Thresholds tabs.

The table below describes the basic regular expressions that you can use.

Meta characterMatchExample
.Matches any single character except newline.

b.t

Scans for the line containing a b followed by any character and a t.

*Matches an expression that has 0 or more of the preceding character.

bt*

Scans for the line containing a b followed by 0 or more ts.

+Matches an expression that has one or more of the preceding character.

bt+

Scans for the line containing a b followed by 1 or more ts.

^Matches the beginning of a line.

^bt

Scans for the line that begins with bt.

$Matches the end of a line.

bt$

Scans for the line that ends with bt.

\

(The escape character)

Prevents the function of the subsequent metacharacter.

file1\.dll

Scans for the line containing file1.dll.

To allow the period to be a part of the line, the "\" prevents the period from functioning as a metacharacter.

[ ]Matches any character that is within these brackets.

[Bb]t[0-9]

Scans for the line that contains an upper or lowercase b, a lowercase t, followed by a digit that is between and including zero and nine.

?Matches an expression that has 0 or 1 of the proceeding character.

bt?

Scans for the line that contains a b that may or may not be followed by a t.