A
ad
Hi,
As title,
How to determine if a string is an EMail account?
As title,
How to determine if a string is an EMail account?
How to determine if a string is an EMail account?
Mark said:Do you mean how to verify that a string is in a valid email address format,
or that the email address actually exists...?
The former is very easy - that latter is very difficult...
Still, format is fairly easy. (e-mail address removed), where the
somethings all have letters, numbers, underscores, or dashes.
Marcus said:The following are correct email addresses that the above will fail to
validate:
(e-mail address removed)
(e-mail address removed)
(e-mail address removed)
user@localhost
There must be a thousand incorrect email validator implementations for
each correct one. Writing a correct email format validator is far more
difficult than most people think. There is a reason that the regex to
parse rfc822 is as large as it is.
Still, format is fairly easy. (e-mail address removed), where the
somethings all have letters, numbers, underscores, or dashes.
There must be a thousand incorrect email validator implementations for
each correct one. Writing a correct email format validator is far more
difficult than most people think. There is a reason that the regex to
parse rfc822 is as large as it is.