I am pretty much new with regular expression. I am developing a project in PHP and i need to validate email address. After searching in this site and google i found the fol
Use these regular expressions to perform a more thorough validation. For example it prevents adjacent periods in email address like aaa..bbb@example..com which is invalid according to RFC 822.
function isValidEmail($email)
{
return preg_match('/\A[a-z0-9]+([-._][a-z0-9]+)*@([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,4}\z/', $email)
&& preg_match('/^(?=.{1,64}@.{4,64}$)(?=.{6,100}$).*/', $email);
}
See validate email address using regular expression in PHP.