Developer
Regex Tester
Write a JavaScript regular expression and test string to see match counts, highlighted matches and capture groups in real time. Invalid patterns are reported clearly, and matches are rendered safely with escaped text.
Examples
Input
Pattern matches digits on 'a1 b22 c333'
Output
3 matches: 1, 22, 333
How to use Regex Tester
Write your pattern
Type a regular expression and optional flags such as g, i or m.
Add test text
Paste the text you want to search; matches highlight as you type.
Inspect the matches
Check the match count, highlighted preview and capture groups.
Why use this tool
Live match count and highlighted preview
Shows capture groups, including named groups
Clear error messages for invalid patterns
Match text is escaped, so highlighting is always safe
Frequently asked questions
It uses the browser's native JavaScript RegExp engine, so syntax and flags match what runs in JS.
Yes. Capture groups for the first few matches are listed, including named groups when present.
Discussion
Share feedback or ask a question about this tool.
Comments are stored to a moderated queue via the API.