Regular Expressions

The following tables provide a overview of the regular expressions syntax. See also Python regular expressions description in the Python re module.

Special Characters



Matches any character (dot).


“^…”, matches start-of-string (caret).


“…$”, matches end-of-string (dollar sign).


“A|B”, matches “A” or “B”.


Escape character.


EXAMPLE: Matches character ‘.’ (dot).


EXAMPLE: Matches character ‘\’ (backslash).

To select or match characters from a special set of characters, a character set must be defined.

Character sets



Define a character set, like [A-Za-z].


Matches digit character: [0-9]


Matches non-digit character.


Matches whitespace character: [ \t\n\r\f\v]


Matches non-whitespace character


Matches alphanumeric character: [a-zA-Z0-9_]


Matches non-alphanumeric character.

A text part must be group to extract it as part (parameter).




Group a regular expression pattern (anonymous group).


Matches text of earlier group by index, like: “\1”.


Matches pattern and stores it in parameter “name”.


Match whatever text was matched by earlier group “name”.


Matches pattern, but does non capture any text.


Comment (is ignored), describes pattern details.

If a group, character or character set should be repeated several times, it is necessary to specify the cardinality of the regular expression pattern.




Pattern with cardinality 0..1: optional part (question mark).


Pattern with cardinality zero or more, 0.. (asterisk).


Pattern with cardinality one or more, 1.. (plus sign).


Matches m repetitions of a pattern.


Matches from m to n repetitions of a pattern.


EXAMPLE: Matches one or more alphabetical characters.