Page tree
No Translation available yet

You have English (United States) selected as language but this page has not been translated yet. Translate the page or view the content in the default space language below.

Display default
Skip to end of metadata
Go to start of metadata


A brief introduction to syntax of regular expressions:


Metacharacters - characters with special meaning

CharacterMeaning
( )groups the characters inside to one group
^beginning of the string or beginning of the line
$end of the string or end of the line
[ ]groups the characters class
.any one character (except new line character \n)
{ }specify the repeat range of the previous symbol
\following character is not metacharacter of regex but regular character
|OR - dividing possible variants


Quantifiers - with their help is possible to specify number of repetitions of certain character or group of characters

QuantifierMeaning
*0 or more occurrences of previous character
+1 or more occurrences of previous character
?0 or 1 occurrence of previous character
{NUMBER}occurrence of previous character equals NUMBER in brackets
{MIN,}occurrence of previous character at least MIN times
{MIN, MAX}occurrence of previous character at least MIN times and most MAX times

Examples of creation of simpler regular expressions can be found here: https://medium.com/factory-mind/regex-tutorial-a-simple-cheatsheet-by-examples-649dc1c3f285

If you want to know more about construction of regular expressions, you can use e.g. this documentation.

  • No labels