in reply to About validating mail id
| [A-Za-z0-9._%-] | matches one letter, digit, dot, underscore, percent or dash character |
| \@ | an "at" sign |
| [A-Za-z0-9_%-.] | matches one letter, digit, underscore, |
| . | any single character except a newline |
| [com] | matches the letter 'c', 'o' or 'm' |
But unforunately both of them are matching .com.com
It matches much more than that:
/[A-Za-z0-9._%-]\@[A-Za-z0-9_%-.].[com]/ and say "'$_' matched" for 'x@zzc', 'a b c@c!c', '?@?@?e@a.m'; __END__ 'x@zzc' matched 'a b c@c!c' matched '?@?@?e@a.m' matched
As others have said, the only way to truly validate an email address is to send mail to it, and hope the owner replies.
Update: updated the second character class
|
|---|