Regex Tester
Test a regular expression against your text and see every match and capture group.
2 matches
Contact ann@example.com or BOB@Test.com for help.
- "ann@example.com" at position 8 ยท groups: $1 = "ann", $2 = "example"
- "BOB@Test.com" at position 27 ยท groups: $1 = "BOB", $2 = "Test"
What is Regex Tester?
A regular expression, or regex, is a pattern that describes text to look for. Developers use them to search, validate and extract text.
Writing a pattern is easier when you can see what it matches straight away.
What this tool does
Runs your pattern against your test text using JavaScript regular expressions and shows the number of matches, highlights each match, and lists the position and capture groups of each one. You can switch the ignore-case, multiline, dot-all and unicode flags.
How to use it
- Enter a pattern.
- Tick the flags you need and paste your test text.
- Read the highlighted matches and the list of groups.
Did you know?
- The mathematician Stephen Kleene described regular languages in the 1950s, which is where regular expressions come from.
- The match limit is 500, and a badly written pattern can be slow on long text.