时间:2021-07-01 10:21:17 帮助过:21人阅读
preg_match("^[-\u4e00-\u9fa5\w]+$","哈哈11122") 报错
preg_match(): No ending delimiter '^' found
preg_match("^[-\u4e00-\u9fa5\w]+$","哈哈11122") 报错
preg_match(): No ending delimiter '^' found
preg_match("/^([\x{4e00}-\x{9fa5}]+)\w+$/u","哈哈11122",$match) ;
var_dump($match);
array(2) {
[0]=>
string(11) "哈哈11122"
[1]=>
string(6) "哈哈"
}