Write a regular expression and see every match highlighted live, with capture groups, named groups, flags and a replace preview. Uses the JavaScript regex engine.
2 matches
| # | Match | user | domain |
|---|---|---|---|
| 1 | agrawatdhruv@gmail.com | agrawatdhruv | gmail.com |
| 2 | hello@dhruvagrawat.com. | hello | dhruvagrawat.com. |
Contact <agrawatdhruv at gmail.com> or <hello at dhruvagrawat.com.> Invalid: someone@ and @nowhere.
\ddigit\wword char\swhitespace.any char^ $start / end* + ?0+, 1+, 0–1{2,5}2 to 5 times[abc]a, b or c(…)capture group(?<name>…)named groupa|ba or b(?=…)lookaheadJavaScript (ECMAScript), the same engine your browser and Node.js use. Most syntax also works in Python, Java and PCRE, but lookbehind and named-group syntax can differ.
g finds all matches, i ignores case, m makes ^ and $ match at line breaks, s lets . match newlines, and u enables full Unicode.