Supported Regular Expression Characters
Advanced Search and data models in
LogLogic LMI support the following regular expression meta characters, based on Java regular expressions:
Characters | Description |
---|---|
\a | Matches ASCII character code 0x07. |
\d | Matches character in the set "0123456789". |
\D | Matches any byte not in the set "0123456789". |
\e | The escape character. Matches ASCII character code 0x1b. |
\f | The form-feed character. Matches ASCII character code 0x0c. |
\n | The new line (line feed) character. Matches ASCII character code 0x0a. |
\r | The carriage return character. Matches ASCII character code 0x0d. |
\s | A white space. Matches white space - \t \n 0x0b \f or \r. |
\S | A non-white space. Matches any byte not in \s. |
\t | The tab character. Matches any byte not in 0x09. |
\w | A word character. Matches any ASCII character in the set underscore, digits, or upper or lower case letter. |
\W | A non-word character. Matches any bytes not in \w. |
\xHH | Matches a byte specified by the hex code HH. There must be exactly two characters after the \x. |
\Q | Starts a quoted region. All meta characters lose their meaning until \E. A \\ can be used to put a backlash into the region. |
\anything else | Matches the next character. |
\k<name> | Refers to previous named capture. |
[] | Specifies a character class - match anything inside the brackets. A leading ^ negates the sense of the class - match anything not inside the brackets. Negated character classes are computed from the set of code in the range 0-127 - in other words no bytes with the high bit set. Within a character class the following backslash characters mean the same thing as outside the character class: \a, \d, \D, \e, \f, \n, \r, \s, \S, \t, \w, \W, and \xHH. |
{num} or {num:num} | Specifies a repetition count for the previous regular expression. Num must be less than 16. {num} is equivalent to {0:num}. |
. | Matches any byte: 0x00 - 0xFF. |
+ | Specifies that the previous regular expression is repeated 1 or more times. |
* | Specifies that the previous regular expression is repeated zero or more times. |
( ) (?:) | Specifies capturing or non-capturing groups. |
(?<name>) | Specifies capturing named groups. |
| | Specifies alternation. |
? | Specifies that the previous regular expression is repeated zero or one time. |
anything else | Any other character matches itself. |
Copyright © Cloud Software Group, Inc. All rights reserved.