Regex Tester β Free Online Tool
Test regular expressions live, highlight matches, and inspect capture groups.
/
/
About Regex Tester
The Regex Tester lets you build and debug regular expressions live against your own sample text. As you type, it highlights every match, counts how many were found, and breaks down each match into its numbered and named capture groups, making complex patterns easy to understand.
It uses your browser's native JavaScript RegExp engine with toggle switches for the g, i, m, and s flags, and it reports clear errors when a pattern fails to compile. Everything runs locally, so your patterns and test data stay private and results update instantly.
How to Use Regex Tester
- Type your regular expression into the pattern field.
- Toggle the g, i, m, and s flags as needed for your match.
- Paste the text you want to test into the test string box.
- Watch matches highlight live and review the capture group breakdown.
Key Features
Live match highlighting as you type the pattern or text
Toggle the global, ignore-case, multiline, and dotall flags
Shows match count, indexes, and numbered capture groups
Displays named capture groups when your pattern uses them
100% client-side with clear, instant error messages
Frequently Asked Questions
Which regex flags are supported?
You can toggle the global (g), ignore case (i), multiline (m), and dotall (s) flags. They map directly to JavaScript's RegExp flags, so behavior matches what you get in JS code.
What regular expression syntax does it use?
The tester uses the JavaScript RegExp engine built into your browser, so all standard JS regex features apply, including character classes, quantifiers, lookarounds, and named capture groups.
Can I see capture groups?
Yes. For every match the tool lists the full match plus each numbered capture group, and it also displays named groups when your pattern defines them.
Why does my pattern show an invalid regex error?
If the pattern cannot be compiled, the tool shows the exact error message from the engine. This usually means an unbalanced bracket, an unescaped special character, or an unsupported construct.
Is my pattern and test text private?
Yes. Matching runs live in your browser as you type, so neither your pattern nor your test string is ever uploaded to a server.