Skip to content
πŸ”

Regex Match Tester

Developer

Test regex patterns with live match highlighting, capture groups, and replacements.

0
0
Pattern2 matches
//g
Test string
Highlighted
Email Ada at [email protected] or Grace at [email protected] to confirm.
No match: just plain text on this line.
Matches

Testing whether a regex matches something is only half the actual problem when the pattern is destined for a find-and-replace operation, since a replacement string with capture group backreferences, $1, $2, and so on, can silently produce something completely different from what was intended if a group is numbered wrong or a backreference points at the wrong part of the match. This tool tests a regex pattern against sample text and previews exactly what a replacement string produces, backreferences included, before that pattern gets used in an actual find-and-replace on real files or code.

See more about the Regex Match Tester

Useful for confirming a replacement string's backreferences pull the right captured groups into the output, catching a pattern that matches correctly but replaces incorrectly, or previewing a bulk find-and-replace safely before running it for real.

Key features

  • Clean interface
  • Fast processing
  • No signup required
  • Works offline

Quick answers for Regex Match Tester

What flags can I toggle on the pattern?
Six standard JavaScript regex flags as buttons: g (global), i (ignore case), m (multiline), s (dotall), u (unicode), and y (sticky), each toggled independently.
Does it show capture groups for each match?
Yes, both numbered groups (labeled $1, $2, and so on) and any named groups from your pattern are listed underneath each match, with unmatched optional groups shown as an empty-set symbol.
What happens if my pattern matches a huge number of times?
The match list displays up to the first 100 matches and then shows a note like "...and 12 more" instead of rendering every single one, keeping the page responsive.