Overview
Allows the use of Unix type regular expression matching. Useful for matching ranges of numbers, letters or symbols in the text. Allows maximum control over what is searched for within the text, including specifying the location within the text to match.
Allows for AND, OR, NOT OR, NOT AND, and exclusion matching.
Details
The regular expression filter allows you to specify Unix type regular expression arguments to tightly control what and where text is matched.
Each search string must be contained by double quotes. Multiple quoted search strings can be placed next to each other on the same line. The filter will then match any of the strings specified. This is an implicit OR relationship.
The [C] button selects a case sensitive or case in-sensitive string search.
The filter matching process will ignore any blank fields.
Leaving the first two fields blank and specifying text in the third and or fourth fields can perform exclusion matching. In this case, if the text is NOT matched the result will be true.
Example:
All strings must be contained in double quotes. Items can be listed next to each other and will be OR'd together.
The filter above reads as:
If the message text starts with "The" (case sensitive) and ends with "dog" but does not contain "chicken" and "Duck" then the result will be true.
This is an example of an exclusion filter:
If the message text does NOT contain the word "The" at the start and the word "dog" at the end then the result will be true. Notice the first two fields are left blank. These fields will be ignored during the filter processing.
Notes:
The "And:" fields can be left blank if they are not required.
If the "And:" fields contain values, the field above it must also contain data.
Regular Expression Syntax:
The regular expression syntax recognized by the filter is based on the following special characters:
CharDescription
^Beginning of a string.
$End of a string.
.Any character.
[list]Any character in list. For example, "[AEIOU]" matches any single uppercase vowel.
[^list]Any character not in list. For example, "[^ ]" matches any character except a space.
[A-Z]Any character between 'A' and 'Z'. For example, "[0-9]" matches any single digit.
?Repeat previous character zero or one time. For example, "10?" matches "1" and "10".
*Repeat previous character zero or more times. For example, "10*" matches "1", "10", "1000", etc.
+Repeat previous character one or more times. For example, "10+" matches "10", "1000", etc.
\Escape next character. This is required to any of the special characters that are part of the syntax. For example "\.\*\+\\" matches ".*+\". It is also required to encode some special non-printable characters (such as tabs) listed below.
In addition to the characters listed above, there are seven special characters encoded using the backslash. These are listed below:
CodeDescription
\aBell or ASCII value of 7
\bBackspace or ASCII value of 8
\fForm feed or ASCII value of 12
\nNew line or ASCII value of 10
\rCarriage return or ASCII value of 13
\tHorizontal tab or ASCII value of 9
\vVertical tab or ASCII value of 11
\qQuote character or ASCII value of 34
For example:
"^stuff" ' any string starting with "stuff"
"stuff$" ' any string ending with "stuff"
"o.d" ' "old", "odd", "ord", etc
"o[ld]d" ' "old" or "odd" only
"o[^l]d" ' "odd", "ord", but not "old"
"od?" ' "o" or "od"
"od*" ' "o", "od", "odd"
"od+" ' "od", "odd", etc
"\." ' decimal point (needs escape character)
"[A-Z][a-z]*" ' any uppercase word
"[0-9]+" ' any stream of digits
"[1-9]+[1-9]*" ' any stream of digits not starting with zero
"[+\-]?[0-9]*[\.]?[0-9]*" ' any number with optional sign and decimal point
'(needs two escape characters)
"dst=\qLOCAL MACHINE\q" ' finds occurrence of "dst="LOCAL MACHINE""