Web Dev Helpers
Regex Tester
Test JavaScript regex patterns with flags and live highlighting.
Pattern
//
Test string
Matches (1)
- [12] contact@suparnpatra.comgroups: ["contact", "suparnpatra.com"]
Replace
Reach me at [email].
About this tool
Type a pattern and a test string, see matches highlighted in real time. Toggle flags (g, i, m, s, u, y), see capture groups, and test replacements.
FAQs
What regex flavour is this?
JavaScript / ECMAScript regex (the same flavour you'd write in `.match()` or `.replace()`).
What does the 'u' flag do?
Turns on Unicode mode - lets you use \u{...} escapes and treats surrogate pairs as a single character.
How do I match newlines?
Use the 's' flag (dotAll) so '.' matches newlines, or use [\s\S] which works regardless of flags.