php正则表达式验证邮件地址
$string = "first.last@domain.co.uk"; if (preg_match( '/^[^\W][a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\@[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\.[a-zA-Z]{2,4}$/', $string)) { echo "example 3 successful."; }
php正则表达式验证邮件地址
$string = "first.last@domain.co.uk"; if (preg_match( '/^[^\W][a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\@[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\.[a-zA-Z]{2,4}$/', $string)) { echo "example 3 successful."; }