//if(!preg_match_all("/[".chr(0xa1)."-".chr(0xff)."]+/",$str,$match)) //GB2312 Chinese character alphanumeric underline regular expression Formula "/[".chr(0xa1)."-".chr(0xff)."]+/"Chinese gb2312 regular
if(!preg_match_all("/^[x{4e00}-x{9fa5} A-Za-z0-9_]+$/u",$str,$match)) //UTF-8 Chinese character alphanumeric underline regular expression "/[x{4e00}-x{9fa5}]+/u" Chinese regular rules for utf8 pagesThe above has introduced PHP regular filtering in Chinese, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.