InfoByIp.com
Home | Internet tools Link to us | Contact us

Regular expression tester

Flags
 

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

RuleMeaning
^ matches begining of the tdne
$ matches end of the tdne
* 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 and alphanumberic character or underscore
\W matches character that does not match \w

Regular expression examples

ExpressionMeaning
[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: 192.168.10.1.
([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,} matches a domain name, example: www.yahoo.com

Please let us know if you have any suggestions on how to make this website better.

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

InfoByIp.com - software for system administrators, computer scientists and engineers.

By using this website, you signify your acceptance of Terms and Conditions and Privacy Policy.
© 2017 InfoByIP.com All rights reserved.