Tools
Write a regular expression, toggle the flags and watch matches highlight in your sample text as you type. Every match is listed with its position and capture groups, including named groups, so you can debug a pattern before it reaches your code.
Pattern
/g
Flags
/(?<user>[\w.+-]+)@(?<domain>[\w-]+\.[\w.]+)/gTest string
2 matches
Contact [email protected] or [email protected]. Order #1024 shipped on 2026-03-14; order #1025 is pending.
Match details
| # | Match | Index | Groups |
|---|---|---|---|
| 1 | [email protected] | 8–25 | user: danny domain: example.com |
| 2 | [email protected]. | 29–55 | user: support domain: danny.engineering. |
Frequently asked questions
- Which regex flavour is this?
- JavaScript, exactly as your browser runs it. Patterns that work here will behave the same in Node.js and the browser. Other engines (PCRE, Python, Java) differ in small ways, such as lookbehind support and named group syntax.
- What do the flags mean?
- g finds every match instead of stopping at the first. i ignores case. m makes ^ and $ match at line breaks. s lets . match newlines. u turns on full Unicode handling.
quick question
Was this tool helpful?