You are viewing a single comment's thread. Return to all comments →
JS
let pat = new RegExp(/\b([\w.]+)@([\w.]+)\.(\w+)\b/, "gm"); let occs = new Set(input.match(pat).sort()); console.log([...occs].join(";"));
\b <--- start and end of a "word" (or email) ---> \b
\w = [a-zA-Z_]
[a-zA-Z_]
[\w.] : We don't need to scape dots inside those brackets.
[\w.]
Seems like cookies are disabled on this browser, please enable them to open this website
Detect the Email Addresses
You are viewing a single comment's thread. Return to all comments →
JS
\b <--- start and end of a "word" (or email) ---> \b
\w =
[a-zA-Z_]
[\w.]
: We don't need to scape dots inside those brackets.