Browser tool
Regex Tester
Paste a pattern and some text to see every match highlighted, inspect capture groups, and preview a replacement. The pattern runs in your browser and the text is never uploaded.
Supports $&,
$1, $<name>
Enter a pattern to test. Matching starts automatically.
Matching uses the regular expression engine built into your browser. Complex patterns can be expensive; a pattern that runs too long is stopped so the page stays responsive.
Flags, groups, and replacement
With g off, only the first match is reported and only the
first match is replaced. Capture groups are listed per match; named groups appear as
$<name>. In the replacement, use
$& for the whole match,
$1 for a numbered group,
$<name> for a named group, and
$$ for a literal dollar sign.
Limits and edge cases
Empty matches are counted and listed but add no highlighted characters. Up to 5,000 matches are highlighted and the list shows the first 200, while the total count and the replacement still cover the whole text. An invalid pattern is reported as an error and keeps the previous highlights hidden.
Related tools
The next step in the same task — and still nothing leaves this browser.