How to use the Regex Tester
- Type a pattern and choose flags.
- Paste test text — matches highlight as you type.
- Inspect groups in the table and try a replacement string.
How it works
Uses the browser's JavaScript RegExp engine with matchAll() to list every match, its index and its numbered or named groups, and String.replace() for the replacement preview ($1, $<name>). Runs entirely in your browser — nothing you paste is sent to our servers.
Worked examples
Find emails
(?<user>[\w.+-]+)@(?<domain>[\w-]+\.[\w.]+) with flag g matches two addresses in the sample and exposes user and domain groups.
Limitations and assumptions
- JavaScript regex differs from PCRE/Python in some features (e.g. possessive quantifiers).
- A badly written pattern can be slow on long text (catastrophic backtracking).
Frequently asked questions
Why does my pattern match nothing?
Check escaping: in this box type \d, not \\d. Also check flags — without i, matching is case-sensitive.
Built and reviewed by Guru G
Calculation logic is covered by automated tests against known values. Last reviewed Nov 6, 2026. Found a problem? Let us know — see our editorial policy.