Regex Tester
Test regular expressions against text, inspect matches and capture groups, and experiment with JavaScript regex flags in real time.
Regular expression
//g
Flags
Quick examples
JavaScript RegExpPattern length: 46/500•Flags: g
Test string
169 / 10,000 charactersMatch results
Highlighted text
Contact us at [email protected] or [email protected]. Useful links: https://example.com https://docs.example.com/guide Phone: +1-555-123-4567 Order ID: ORD-2026-1042
Highlighting shows non-overlapping matches. Exact match positions and capture groups are listed below.
Matches and capture groups
Match 1Index 14–33
"[email protected]"
Start index: 14 · End index: 33
No capture groups in this pattern.
Match 2Index 37–54
"[email protected]"
Start index: 37 · End index: 54
No capture groups in this pattern.
Regex quick reference
.Any character except newline by default\dA digit\wA word character\sWhitespace+One or more occurrences*Zero or more occurrences?Zero or one occurrence^Start of input or line with m$End of input or line with m[abc]Any one of the listed characters(abc)Capture a matching group(?:abc)Non-capturing groupPrivacy and performance
Matching runs in your browser; this page does not send your test text to a server. Complex regular expressions can take a long time to evaluate. This tool limits pattern and input lengths, but those limits cannot prevent every slow expression. Avoid testing untrusted patterns against sensitive or unnecessarily large inputs.
Built for developers · Test JavaScript regular expressions instantly