This section provides examples for using the watch logfile directive in the sysedge.cf file to add regular expression to the Log Monitor table.
Example: /the quick brown fox/
The following example searches for the regular expression '/the quick brown fox/' in the sentences:
The quick brown fox jumps over the lazy dog.
the quick brown fox jumps over the lazy dog.
the quick brown fox
Example: /The quick brown fox/i
The following example searches for the regular expression '/The quick brown fox/i' in the sentences. The search matches for the expression 'The quick brown fox', regardless of the case.
The quick brown fox jumps over the lazy dog.
the quick brown fox jumps over the lazy dog.
the quick brown FOX jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
the quick brown fox jumps over the lazy dog.
the quick brown FOX jumps over the lazy dog.
Example: /^abc$/m
The following example searches for the regular expression '/^abc$/m' in the sentences. This expression matches only if the pattern 'abc' is on its own line.
Lazy dog\nquick horse\nabc
abc
Example: /two.*three.*four/s
The following example searches for the regular expression '/two.*three.*four/s' in the sentences. When the PCRE_DOTALL pattern modifier is specified, the dot metacharacter also matches on newlines.
one number\ntwo numbers\nthree numbers\nfour numbers\nfive numbers
Two numbers\nthree numbers\nfour
Example: /^1234 # comment in input string/x
The following example searches for the regular expression '/^1234 #comment in extended re/x' in the sentences. This expression matches on the quoted text, regardless of whitespace encountered in the input.
1234 #comment in input string
1234 # comment in input string
1234#commentininputstring
1234 #comment in input string
1234 # comment in input string
1234#commentininputstring
Example: /X$/E
The following example searches for the regular expression '/X$/E' in the sentences. The text in the pattern (“X”) matches only at the end of the subject string.
Test X
What can I do with X
X
X
Example: /a[^]b/<JS>
The following example searches for the regular expression '/a[^]b/<JS>' in the sentences. Specifying the “<JS>” pattern modifier activates JavaScript compatibility mode for this expression.
aXb
aXb
Copyright © 2013 CA. All rights reserved. |
|