Validate Email address with regular expression?
Posted: Wed Aug 20, 2014 11:50 am
Hi all
I am after a better way to validate email addresses, ideally one that purely deals with a String -> with vars emailaddress : String;
I could then script to weed out erroneous email addresses in our system.
Ideally applying a Regular Expression to String like;
[a-z0-9!#$%&''*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?
Thoughts?
I am after a better way to validate email addresses, ideally one that purely deals with a String -> with vars emailaddress : String;
I could then script to weed out erroneous email addresses in our system.
Ideally applying a Regular Expression to String like;
[a-z0-9!#$%&''*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?
Thoughts?