Regex Tester
Build and test regular expressions against your own text with live match highlighting, capture groups and a replacement preview — running entirely in your browser.
No matches.
How to use it
- 1Enter your pattern
Type a regular expression and toggle flags like global, ignore-case or multiline.
- 2Add test text
Paste the text you want to match against. Matching updates live as you type.
- 3Inspect matches and groups
Matches are highlighted in place, with a list of every match plus its named and numbered capture groups.
- 4Preview a replacement
Enter a replacement string to see exactly what your substitution would produce.
See your regex work in real time
Stop guessing whether a pattern matches. As you type, every match is highlighted directly in your test text, with a breakdown of numbered and named capture groups.
Safe, private testing
Your pattern and test data stay in your browser. Matching even runs in a background worker with a timeout, so a pathological pattern can’t freeze the page.
Frequently asked questions
Is my text or pattern uploaded anywhere?
No. The regular expression runs locally in your browser; your pattern and text never leave your device.
Which flags are supported?
All standard JavaScript flags: global (g), ignore-case (i), multiline (m), dotAll (s), unicode (u) and sticky (y).
What happens with a slow or “catastrophic” pattern?
Matching runs in a background worker with a timeout. If a pattern hangs (catastrophic backtracking) it is stopped automatically and you are warned, so the page never freezes.
Does it show capture groups?
Yes — both numbered and named capture groups are listed for every match.
Which regex flavour is this?
It uses the JavaScript (ECMAScript) regular-expression engine built into your browser.