RegEx Control Email


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. public static function checkEmail(email:String):Boolean {
  2. var regExEmail:RegExp = new RegExp(/[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+(?:[A-Z]{2}|com|org|net|gov|mil|biz|info|name|aero|biz|info|mobi|jobs|museum)b/i);
  3.  
  4. return regExEmail.test(email);
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.