Regex Tester
Test a regular expression against sample text with live match highlighting and capture group inspection.
Highlighted result
2 matches
Match 1: hello@example.com (at index 14)
Groups: $1=hello, $2=example.com
Match 2: support@example.org (at index 35)
Groups: $1=support, $2=example.org
Recommended Settings
Pro Tips
- •Enable Global to find every match in the text, not just the first one - most real-world use cases want this on
- •Capture groups (in parentheses) are numbered $1, $2, and so on in the order they appear, and shown separately for each match
- •Named groups, written as (?<name>...), are also detected and shown by name for easier reference in your code
- •An invalid pattern shows JavaScript's own regex error message, which usually points to exactly what's malformed
Most Popular
Most developers test with Global and Ignore Case enabled to find every match regardless of letter casing
When to Use This Tool
Iteratively refine a regular expression while seeing live match results.
See exactly what each capture group extracts from matched text.
Confirm a validation pattern correctly matches valid input and rejects invalid input.
Experiment with regex syntax and see immediate visual feedback on matches.
How It Works
Compile your pattern and selected flags into a JavaScript regular expression
Run it against your test string, collecting every match along with its capture groups
Highlight each matched substring directly within the test text for immediate visual feedback
100% Private
Files never leave your device. All processing happens locally in your browser.
Lightning Fast
Powered by Client-side JavaScript RegExp engine for optimal performance on modern browsers.
Open Source
Built with verified, open-source libraries. Fully transparent.
Frequently Asked Questions
What's the difference between the g and no-g flags?
With the Global flag, the regex finds every match in the text. Without it, only the first match is found, even if the pattern could match multiple times.
What are named capture groups?
Groups written as (?<name>...) let you reference a captured value by name instead of by position, making patterns with many groups easier to read and use in code.
Does this support all JavaScript regex features?
Yes, since it runs your pattern through the browser's actual native RegExp engine, all standard JavaScript regex features and flags are supported.
Is my test data sent anywhere?
No. All pattern matching happens locally in your browser.