get email from string
by Oliver Kelso
JavaScript
let match = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
let txt = 'https://www.domain.com/page?param=value¶m2=value2&[email protected]¶m4=anotherVal';
let results = txt.match(match);
console.log(results);