Regexp per la validazione di un indirizzo email
Basato sull'articolo http://www.regular-expressions.info/email.html
function check_email($email)
{
if(preg_match("/^[A-Z0-9._!#$&\'*+\/=?^_`{|}~%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i", $email, $match))
return true;
else
return false;
}
{
if(preg_match("/^[A-Z0-9._!#$&\'*+\/=?^_`{|}~%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i", $email, $match))
return true;
else
return false;
}