Regex Tester
Test JavaScript regular expressions against sample text. Every match is listed with its index, capture groups, and named groups, and invalid patterns report the engine's own error message. Without the global flag you get the first match only, exactly like RegExp.prototype.exec.
Test text
Matches
Matches will appear hereReady. Press Test.
How to use the Regex Tester
- Enter a pattern and choose flags.
- Paste the text to test against.
- Review the matches and groups.
Example
Try it against an address like ada@example.com with the g flag on.
(\w+)@(\w+)\.com
Frequently asked questions
Which regex flavor?
JavaScript (ECMAScript), since the tester runs in your browser. PCRE and Python flavors differ in some syntax.
Why only one match?
Without the g flag, JavaScript regex execution returns the first match. Add g to list them all.