$str = '中华人民共和国123456789abcdefg'; echo preg_match("/^[\u4e00-\u9fa5_a-zA-Z0-9]{3,15}$",$strName); 运行一下上面这段代码,看会有什么提示信息? Warning: preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in F:\wwwroot\php\test.php on line 2 原来,PHP正则表达式中不支持下列 Perl 转义序列:\L, \l, \N, \P, \p, \U, \u, or ...[ 查看全文 ]