版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
代码:
/**
* return bool
**/
function is_email($email) { $pattern = "/^[^_][\w]*@[\w.]+[\w]*[^_]$/"; if(preg_match($pattern, $email, $matches)){ return true; } return false; }
代码:
/**
* return bool
**/
function is_email($email) { $pattern = "/^[^_][\w]*@[\w.]+[\w]*[^_]$/"; if(preg_match($pattern, $email, $matches)){ return true; } return false; }