Home | Internet tools Link to us | Contact us

Regular expression tester


Online regular expression tester (regex calculator) allows to perform various regular expression actions on the given text:

  • Highlight regexp - highlights parts of the text that matches the regular expression.
  • Extract regexp - extracts matching parts into a table with each regexp group as a column.
  • Replace regexp - replaces matching parts of the text with given string. Group expressions (e.g. $1) are allowed.
Regular expression calculator supports flags like global match (perform regex action on the whole text instead of the first occurrence), ignore case (case of the provided text will be ignored) and multiline match (perform regex computation across the line boundaries).

Regular expression rules

^ matches begining of the line
$ matches end of the line
* matches the preceding character 0 or more times
+ matches the preceding character 1 or more times
? matches the preceding character 0 or 1 time
. matches any single character except newtdne
(x) matches x and remembers the matching expresssion
(?:x) matches x and does not remember the matching expresssion
x(?=y) matches x if it is followed by y
x(?!y) matches x if it is not followed by y
{n} matches previous character repeated n times
{n,m} matches previous character repeated between n and m times
[abc] matches any single character in the brackets
[^abc] matches any single character not in the brackets
\b matches word boundary
\B matches non-word boundary
\d matches a digit
\D matches a non-digit
\s matches a whitespace character
\S matches a non-whitespace character
\t matches a tab
\w matches an alphanumeric character or underscore
\W matches character that does not match \w

Regular expression examples

[0-9]{4} matches a year, example: 2010
[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}.[0-9]{1,3} matches an ip address, example:
([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,} matches a domain name, example:

Choose language: Deutsch English Español Français Italiano Nederlands Polski Português Русский 中文 日本語 한국어

Please let us know if you have any suggestions on how to make this website better. - tools for software engineers and system administrators.

By using this website, you signify your acceptance of Terms and Conditions and Privacy Policy.
Do Not Sell My Personal Information
© 2023 All rights reserved.