Regex Tester
Write a pattern, choose flags and paste test text. Matches are highlighted, groups listed, and you can preview a replacement. Patterns that would freeze the page are stopped after one second.
Matches highlighted
Result after replacing
How to use this tool
- Enter the pattern without slashes and choose flags.
- Paste the text to test.
- Read the matches and groups, or enter a replacement to preview it.
How it works
The pattern runs with the browser's JavaScript regex engine (ECMAScript flavour) in a separate worker thread, so a slow pattern cannot freeze the page; after one second it is stopped and reported. Up to 1,000 matches are listed.
Limitations
- JavaScript regex syntax differs slightly from PCRE (PHP), Python and others, for example in lookbehind support and named-group syntax.
Privacy and data
Everything happens in your browser. What you paste or open is never sent to our server, logged or stored, and the page works offline once loaded.