How to use
Paste your text, enter a pattern and flags, then run the checker.
- Enter your regex pattern (without surrounding
/slashes). - Set flags (for example:
gim). - Paste the test text.
- Click Check matches to see matches and groups, or Replace preview to preview a replacement.
FAQ
Does this regex checker use PCRE or JavaScript regex?
It uses JavaScript RegExp (ECMAScript), so some PCRE features may not work.
Should I include the leading and trailing slashes like /abc/ ?
No—enter only the pattern (for example abc) and set flags separately.
Why do I only see one match sometimes?
If you don’t include the g flag, the tool shows only the first match (like a single exec).
Can I test capture groups?
Yes. The output lists numbered capture groups for each match, and named groups if your browser supports them.
What happens with empty-string matches (like ^ or .*?)?
The tool guards against infinite loops by advancing the index when a match is empty.
Is my text sent to a server?
No. Matching and replace preview run locally in your browser.
How do I preview a replace result?
Fill the Replacement field and click Replace preview; the output includes the replaced text (truncated if very large).