Regex Tester
Test regular expressions with real - time highlighting. See matches, capture groups, and flags instantly. Supports JavaScript regex syntax.
Debugging regular expressions in a code editor means running and re - running your program to see what matches. An interactive regex tester highlights matches in real time and shows capture groups instantly, so you can iterate faster.
Next step
Help and details
How to use
- Enter your regular expression pattern
- Choose flags (global, case - insensitive, multiline, etc.)
- Paste or type your test string
- See matches highlighted in real time with group details
Privacy and processing
All matching happens in your browser. No data is sent to our servers.
Frequently Asked Questions
What regex syntax is supported?
This tool uses JavaScript's built - in RegExp engine, supporting all standard JS regex features including lookahead, lookbehind, named groups, and Unicode.
What are regex flags?
Flags modify how the pattern matches: g (global - find all matches), i (case - insensitive), m (multiline - ^ and $ match line boundaries), s (dotAll - . matches newlines).
Can I see capture groups?
Yes, all captured groups (including named groups) are displayed for each match with their index and value.
Why is my regex showing an error?
The tool shows a real - time error if your pattern has invalid syntax. Check for unmatched parentheses, brackets, or invalid escape sequences.
Does this support lookbehind?
Yes, JavaScript supports both positive (?<=...) and negative (?<!...) lookbehind assertions in modern browsers.
Is my test data private?
Yes. All matching runs locally in your browser. No data is sent to any server.
Can I use this for other languages?
Regex syntax is largely similar across languages. However, some features (like lookbehind) may differ. This tool uses JavaScript syntax specifically.
Does this work offline?
Yes, once loaded, the tester works entirely in your browser without needing an internet connection.