User Community Service Desk Downloads
If you can't find the product or version you're looking for, visit

Regular Expressions

Using regular expressions, you can extract information or parse a string into multiple elements. The regex engine is based on Java.util.regex, following industry standards.

Metacharacters defined

Character Description Pattern Sample matches


Start of a string.


abc, abcdefg, abc123


End of a string.


abc, endsinabc, 123abc


Any character (except \n newline).


abc, aac, acc, adc, aec




ted, bill


Explicit quantifier notation.




Explicit set of characters to match.


abc, aBc


Logical grouping of part of an expression.




Zero or more of previous expressions.


ac, abc, abbc, abbbc


One or more of previous expressions.


abc, abbc, abbbc


Zero or one of previous expressions. Also forces minimal matching when an expression might match several strings within a search string.


ac, abc


Preceding one of the previously described characters, it makes it a literal instead of a special character. Preceding a special matching character, see Character escapes.


a c

Character escapes

Escaped character Description

Ordinary characters

Characters other than . $ ^ { [ ( | ) ] } * + ? \ match themselves.


Matches a tab \u0009.


Matches a carriage return \u000D.


Matches a form feed \u000C.


Matches a new line \u000A.


Matches an ASCII character as an octal (up to three digits). Numbers with no leading zero are backreferences if they have only one digit or if they correspond to a capturing group number. For example, the character \040 represents a space.


Matches an ASCII character using hexadecimal representation (exactly two digits).


Matches a Unicode character using a hexadecimal representation (exactly four digits).


When followed by a character that is not recognized as an escaped character, it matches that character. For example, \* is the same as \x2A.

Character classes

Character class Description


Matches any character except \n (newline).


Matches any single character included in the specified set of characters.


Matches any single character not in the specified set of characters.


Use of a hyphen (-) allows the specification of contiguous character ranges.


Matches any word character. It is equivalent to [a-zA-Z_0-9].


Matches any non-word character. It is equivalent to [^a- zA-Z_0-9].


Matches any whitespace character. It is equivalent to [\f\n\r\t\v].


Matches any non-whitespace character. It is equivalent to [^ \f\n\r\t\v].


Matches any decimal digit.


Matches any non-digit.

Was this page useful?