Regex Tester
Runs entirely in your browser
Test a regular expression against sample text, with live match highlighting and capture groups.
What is Regex Tester?
Regex Tester runs a JavaScript regular expression against sample text and shows you every match, highlighted in place, along with any capture groups. It's useful for building and debugging patterns for validation, parsing or search-and-replace.
How to use Regex Tester
- Type your regular expression pattern.
- Choose the flags you need (g, i, m, s, u, y).
- Paste or edit the test string and review the highlighted matches and capture groups.
Features
- Live matching as you type — no button to click.
- Supports all six JavaScript regex flags.
- Highlights every match directly in the test string.
- Lists numbered and named capture groups per match.
- Clear error messages for invalid patterns.
- 100% client-side — your text never leaves your browser.
Frequently Asked Questions
Which regex flags are supported?
g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode) and y (sticky) — the full set supported by JavaScript's RegExp.
Can a bad regex freeze the page?
No. Matching is capped at 10,000 iterations, which protects against runaway zero-width-match loops while comfortably covering realistic test strings.
Is my text uploaded to a server?
No. Matching runs entirely in your browser using JavaScript's native RegExp engine.
Does this show capture groups?
Yes. Each match lists its numbered capture groups (and named groups, if your pattern uses them) alongside the full match.