I have this code that I used to use to validate E-mail addresses in Perl, but when I used it in a php perl-compatible regular expression match to validate E-mail addresses it didn't work. Could you tell me what's wrong with it?
if (!preg_match("/[\w.-]+@([\w.-].)+\w+$/", $email))
{
print "Inavlid E-mail!";
}
Thanks in advance for your help =)