首页 >后端开发 >php教程 >php检测邮箱密码_PHP教程

php检测邮箱密码_PHP教程

WBOY
WBOY原创
2016-07-12 09:04:01996浏览

php检测邮箱密码

$pattern = "/^[0-9a-zA-Z_-]+(\.[0-9a-zA-Z_-]+)*@[a-zA-Z0-9_-]+(\.{1}[a-zA-Z0-9_-]+)*\.{1}[a-zA-Z]{2,4}$/i";
if(!preg_match($pattern,$email)){
echo "邮箱不符合规则";
}
 
//$patternpwd = "/[A-Za-z]{6,15}/";
//$patternpwdnum = "/[0-9]{6,15}/";
$pa="/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/";//字母数字不少于6位
if(!preg_match($pa,$pwd)){
    echo "密码不符合规则";

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1075138.htmlTechArticlephp检测邮箱密码 $pattern = /^[0-9a-zA-Z_-]+(\.[0-9a-zA-Z_-]+)*@[a-zA-Z0-9_-]+(\.{1}[a-zA-Z0-9_-]+)*\.{1}[a-zA-Z]{2,4}$/i; if(!preg_match($pattern,$email)){ echo 邮箱不符合...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn