$name=$_POST['name'];
$nr="/^[a-zx{4e00}-x{9fa5}]+$/iu";
preg_match($nr,$name,$match)
出现一下错误:
preg_match(): Delimiter must not be alphanumeric or backslash
我看到stackoverflow上说没有分隔符,我想应该不是这个原因,不知道是什么问题?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你是要匹配中文吗?
$nr="/^[a-z\x{4e00}-\x{9fa5}]+$/iu";