复制代码 代码如下: ?php //密码验证 $password = "zongzi_Abc_oo13a2"; $n = preg_match_all("/^[a-zA-Z\d_]{8,}$/",$password,$array); //长度是8或更多 var_dump($array); ?
<?php
//密码验证
$password = "zongzi_Abc_oo13a2";
$n = preg_match_all("/^[a-zA-Z\d_]{8,}$/",$password,$array);
//长度是8或更多
var_dump($array);
?>