Skip to content
Burrows Tools

Regex Tester

Write a pattern, paste some text, and see exactly what matches — highlighted in place, listed with its position, and broken down by capture group. Numbered groups and named (?<name>...) groups both appear in the table, including the ones that did not participate in a match, so the numbering never surprises you later. Flags are checkboxes rather than something to remember, and switching one re-runs the match immediately. Turn on the replace preview to see what the string becomes, with $1-style back-references working as they do in String.replace. The engine is your own browser's, so what you see here is precisely what the same pattern will do in your JavaScript — no dialect translation, no server round trip, and no copy of your test data anywhere but this tab.

Flags

Matched in your browser. Up to 100,000 characters.

3 matches.

Matches

Contact ada@example.com or alan@example.org before Friday.
Escalate to ops@example.net after that.
Every match with its position and capture groups
#IndexMatchGroups
18ada@example.com
  • 1: ada
  • 2: example.com
227alan@example.org
  • 1: alan
  • 2: example.org
371ops@example.net
  • 1: ops
  • 2: example.net

How to use the regex tester

  1. Type your pattern into the expression field — no surrounding slashes needed.
  2. Tick the flags you want: global, ignore case, multiline, dot matches newline, unicode, or sticky.
  3. Paste the text to test against and watch the matches highlight as you type.
  4. Read the table for each match's position and capture groups, and turn on the replace preview to try a substitution.

Frequently asked questions

Which regex flavour is this?
JavaScript's, because the matching is done by your browser's own RegExp engine. Most patterns are portable, but a few things differ from PCRE: there are no possessive quantifiers or atomic groups, and recursion is not supported.
Why do I only get one match?
The global flag is off. Without it a regular expression stops at the first match — that is how RegExp behaves everywhere, not a limit of this page. Tick 'g' to find them all.
What do the capture group numbers mean?
Groups are numbered by the position of their opening parenthesis, left to right, which is what $1, $2 and so on refer to in a replacement. Non-capturing groups and lookarounds do not take a number. A group that is inside an alternative branch that did not run is shown as not participating rather than being renumbered.
Is there a limit on the text I can test?
The test string is capped at 100,000 characters, and matching stops after 1,000 matches. Once a regular expression starts running, JavaScript cannot interrupt it — so a pattern that backtracks catastrophically would freeze the tab, and bounding the input is the practical defence.
Is my pattern or test data uploaded?
No. Everything runs in your browser. Nothing is sent to a server, logged, or saved, which makes this safe for testing patterns against real log lines or production data.