怎么在php文件中写入只能输入2-6位汉字的正则?求大神指教
$str = "汉字的正则"; if (preg_match("/^[\u4e00-\u9fa5]{2,6}$/",$str)) { print("符合要求"); }