Home | Internet Tools | Link to Us
1 2 3 4 5

Regular expression tester

Regex
Action
Flags global (g), ignore case (i), multiline (m).
Text
 
 
Online regular expression tester (aka 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 newline
  • (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
  • [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.
What is my IP?  Show my IP!  Detect my IP!
Information by IP address
Contact webmaster
InfoByIP.com - Tools for the Internet.
By using this website, you signify your acceptance of Terms and Conditions and Privacy Policy. Copyright 2014 www.InfoByIP.com All rights reserved.