Here are a few regexes that i would use in a production system to check if an email is valid:
"([\\w-]+(?:\\.[\\w-]+)*@(?:[\\w-]+\\.)+\\w{2,7})\\b"
Something a little more light weight:
"[^\\s]+@[^\\s]+([.]\\w{2,3})+"
and if all else fails, this might be useful:
Apache Commons EmailValidator class API
http://www.regular-expressions.info/email.html
ReplyDeletethanks for the link, i havent been there in a while, but as i recall its a trustworthy resource
ReplyDeleteGood words.
ReplyDelete