You are viewing a single comment's thread. Return to all comments →
JavaScript
I made it so complex, even I got confused.
function processData(input) { let criteria = /([a-z\d._]+)@([a-z\d._]+\.[a-z]+)/gi; let arr = input.match(criteria); let emails = [...new Set(arr)]; console.log(emails.sort().join(";")); }
Corrected regex: let criteria = /[\w._]+@[\w._]+[\w]/g;
let criteria = /[\w._]+@[\w._]+[\w]/g;
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 →
JavaScript
I made it so complex, even I got confused.
Corrected regex:
let criteria = /[\w._]+@[\w._]+[\w]/g;