Last active
December 21, 2016 16:10
-
-
Save brianpow/4b0342234c7463940820 to your computer and use it in GitHub Desktop.
Grab email address from text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var data = []; | |
| $(document.body).text().replace(/[\w\.]+@[\w\.]+/g, function(a){if(data.indexOf(a) == -1) data.push(a);}); | |
| console.log(data.join(",")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment