Text & Regex
Regex Tester
Live JavaScript regex matching with groups and replacement, safe from runaway patterns.
Loading the Regex Tester…
About the Regex Tester
Write a regular expression and see every match highlighted as you type, with numbered and named capture groups and the result of a replacement. Patterns run in a background worker with a time limit, so catastrophic backtracking stops after two seconds instead of freezing the page.
How to use it
- Enter the pattern and choose flags.
- Paste the test text.
- Inspect matches and groups, or try a replacement.
Frequently asked questions
- Which regex flavour is used?
- JavaScript (ECMAScript), the same engine as your browser and Node.js, including named groups, lookbehind and Unicode property escapes with the u flag.
- What is catastrophic backtracking?
- Patterns such as (a+)+$ can take exponential time on some inputs. The tester detects this with a timeout instead of hanging.
- Is my text uploaded?
- No. Everything runs in your browser tab with JavaScript. Nothing you enter is uploaded, logged or stored, and the page works offline once loaded.