Regular expressions

A regular expression, also known as a regex or regexp, is a string whose pattern (template) describes a set of strings. The pattern determines which strings belong to the set. A pattern consists of literal characters and metacharacters, which are characters that have special meaning instead of a literal meaning.


Matching Symbols

Regular Expression Description


Matches any character


Finds regex that must match at the beginning of the line.


Finds regex that must match at the end of the line.










Finds X or Z.


Finds X directly followed by Z.


Checks if a line end follows.


Meta Characters


Regular Expression Description


Any digit, short for [0-9]






A non-whitespace character, short for




A non-word character [^\w]


Several non-whitespace characters







Regular Expression Description Examples






X+- Finds one or several letter X



X? finds no or exactly one letter X





Occurs between X and Y times,





Grouping and back reference


In addition these groups also create a back reference to the part of the regular expression. This captures the group. A back reference stores the part of the string which matched the group. This allows you to use this part in the replacement.

Via the ${} you can refer to a group. ${1} is the first group, ${2} the second, etc.



Negative look ahead




Regular expresions examples

You can experiment with regular expressions at

Have more questions? Submit a request


Powered by Zendesk