Created
September 27, 2013 18:41
-
-
Save mikatalk/6733231 to your computer and use it in GitHub Desktop.
Find all email addresses in a string (*not validation):
This file contains 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 s:String = "rew+hello-wOrld@we2y.com hey wasup! , email.blabla@gmail.com zguegue@morue.fr"; | |
var rex:RegExp = /[^\s,]+@[^\s,]+/g; | |
trace( s.match(rex).join(",") ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
or
var rex:RegExp = /[a-zA-Z0-9.!#$%&'+-/=?^`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)_/g