$('a[name]').remove(); $('#ic-homepage__footer').before('

'); $("#tabs").tabs({ selected: 1 }); $("#ic-homepage__ic-tips").append( quickTipHTML() ); unhideOneProductTip(); $("#ic-homepage__product-tips").wrapInner('

'); $("#ic-homepage__feed-tips").wrapInner('

'); });

IBM Tivoli Monitoring > Version 6.3 > User's Guides > Agent Builder User's Guide IBM Tivoli Monitoring, Version 6.3


ICU regular expressions

A description of the specifics of the ICU regular expression implementation.

This reference content is extracted from the ICU User Guide. The content describes the specifics of the ICU regular expression implementation. This information is essential if you are using the Agent Builder regular expression feature because different programming languages implement regular expressions in slightly different ways.


Regular expression metacharacters

Character Description
\a Match a BELL, \u0007
\A Match at the beginning of the input. Differs from ^ in that \A does not match after a new line within the input.
\b, outside of a [Set] Match if the current position is a word boundary. Boundaries occur at the transitions between word (\w), and non-word (\W) characters, with combining marks ignored. For more information about word boundaries, see ICU Boundary Analysis.
\b, within a [Set] Match a BACKSPACE, \u0008.
\B Match if the current position is not a word boundary.
\cX Match a Ctrl-X character.
\d Match any character with the Unicode General Category of Nd (Number, Decimal Digit.)
\D Match any character that is not a decimal digit.
\e Match an ESCAPE, \u001B.
\E Terminates a \Q ... \E quoted sequence.
\f Match a FORM FEED, \u000C.
\G Match if the current position is at the end of the previous match.
\n Match a LINE FEED, \u000A.
\N{UNICODE CHARACTER NAME} Match the named character.
\p{UNICODE PROPERTY NAME} Match any character with the specified Unicode Property.
\P{UNICODE PROPERTY NAME} Match any character not having the specified Unicode Property.
\Q Place quotation marks around all following characters until \E.
\r Match a CARRIAGE RETURN, \u000D.
\s Match a white space character. White space is defined as [\t\n\f\r\p{Z}].
\S Match a non-white space character.
\t Match a HORIZONTAL TABULATION, \u0009.
\uhhhh Match the character with the hex value hhhh.
\Uhhhhhhhh Match the character with the hex value hhhhhhhh. Exactly eight hex digits must be provided, even though the largest Unicode code point is \U0010ffff.
\w Match a word character. Word characters are [\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}].
\W Match a non-word character.
\x{hhhh} Match the character with hex value hhhh. From one to 6 hex digits can be supplied.
\xhh Match the character with 2 digit hex value hh.
\X Match a Grapheme Cluster.
\Z\ Match if the current position is at the end of input, but before the final line terminator, if one exists.
\z Match if the current position is at the end of input.
\n Back Reference. Match whatever the nth capturing group matched. n must be a number > 1 and < total number of capture groups in the pattern.

Octal escapes, such as \012, are not supported in ICU regular expressions.

[pattern] Match any 1 character from the set. See UnicodeSet for a full description of what can appear in the pattern
. Match any character.
^ Match at the beginning of a line.
$ Match at the end of a line.
\ Place quotation marks around the following character. Characters that must have surrounding quotation marks to be treated as literals are * ? + [ ( ) { } ^ $ | \ . /


Regular expression operators

Operator Description
| Alternation. A|B matches either A or B.
* Match 0 or more times. Match as many times as possible.
+ Match 1 or more times. Match as many times as possible.
? Match zero or 1 time. Prefer one.
{n} Match exactly n times
{n,} Match at least n times. Match as many times as possible.
{n,m} Match between n and m times. Match as many times as possible, but not more than m.
*? Match 0 or more times. Match as few times as possible.
+? Match 1 or more times. Match as few times as possible.
?? Match zero or 1 time. Prefer zero.
{n}? Match exactly n times
{n,}? Match at least n times, but no more than required for an overall pattern match
{n,m}? Match between n and m times. Match as few times as possible, but not less than n.
*+ Match 0 or more times. Match as many times as possible when first encountered, do not retry with fewer even if overall match fails (Possessive Match)
++ Match 1 or more times. Possessive match.
?+ Match zero or 1 time. Possessive match.
{n}+ Match exactly n times
{n,}+ Match at least n times. Possessive Match.
{n,m}+ Match between n and m times. Possessive Match.
( ... ) Capturing parentheses. Range of input that matched the parenthesized subexpression is available after the match.
(?: ... ) Non-capturing parentheses. Groups the included pattern, but does not provide capturing of matching text. More efficient than capturing parentheses.
(?> ... ) Atomic-match parentheses. First match of the parenthesized subexpression is the only one tried. If it does not lead to an overall pattern match, back up the search for a match to a position before the "(?>".
(?# ... ) Free-format comment (?# comment ).
(?= ... ) Look-ahead assertion. True if the parenthesized pattern matches at the current input position, but does not advance the input position.
(?! ... ) Negative look-ahead assertion. True if the parenthesized pattern does not match at the current input position. Does not advance the input position.
(?<= ... ) Look-behind assertion. True if the parenthesized pattern matches text that precedes the current input position. The last character of the match is the input character just before the current position. Does not alter the input position. The length of possible strings that is matched by the look-behind pattern must not be unbounded (no * or + operators.)
(?<!...) Negative Look-behind assertion. True if the parenthesized pattern does not match text that precedes preceding the current input position. The last character of the match is the input character just before the current position. Does not alter the input position. The length of possible strings that is matched by the look-behind pattern must not be unbounded (no * or + operators.)
(?ismx-ismx: ... ) Flag settings. Evaluate the parenthesized expression with the specified flags enabled or disabled.
(?ismx-ismx) Flag settings. Change the flag settings. Changes apply to the portion of the pattern that follows the setting. For example, (?i) changes to a not case-sensitive match.


Replacement text

The replacement text for find-and-replace operations can contain references to capture-group text from the find. References are of the form $n, where n is the number of the capture group.


Replacement text characters

Character Description
$n The text of the positional capture group n is substituted for $n. n must be >= 0, and not greater than the number of capture groups. A $ not followed by a digit has no special meaning, and is displayed in the substitution text as itself, a $.
\ Treat this character as a literal, suppressing any special meaning. Backslash escaping in substitution text is required only for '$' and '\', but can be used on any other character without adverse effects.
$@n The text of capture group n is substituted for the regular expression that matched capture group n. n must be >= 0, and not greater than the number of capture groups. A $@ not followed by a digit has no special meaning, and is displayed in the substitution text as itself, a $@.
$#n The text of the matched capture group n is substituted for $#n. n must be >= 0, and not greater than the number of matched capture groups. A $# not followed by a digit has no special meaning, and is displayed in the substitution text as itself, a $#.


Flag options

The following flags control various aspects of regular expression matching. The flag values can be specified at the time that an expression is compiled into a RegexPattern object. Or, they can be specified within the pattern itself using the (?ismx-ismx) pattern options.


Flag options

Flag (pattern) Flag (API constant) Description
i UREGEX_CASE_INSENSITIVE If set, matching take place in a case-insensitive manner.
x UREGEX_COMMENTS If set, white space and #comments can be used within patterns.
s UREGEX_DOTALL If set, a "." in a pattern matches a line terminator in the input text. By default, it does not. A carriage-return / line-feed pair in text behaves as a single-line terminator, and matches a single "." in a RE pattern
m UREGEX_MULTILINE Control the behavior of "^" and "$" in a pattern. By default these patterns match only at the start and end, respectively, of the input text. If this flag is set, "^" and "$" also match at the start and end of each line within the input text.



+

Search Tips   |   Advanced Search