python 正则校验 判断只能为中文字符(即汉字和中文标点符号)
正则校验 判断中文字符
test_str = ' '
pattern = re.findall('[^\x00-\xff]' , test_str)
if len(test_str)>len(pattern):
print('不符合')
正则校验 判断中文字符
test_str = ' '
pattern = re.findall('[^\x00-\xff]' , test_str)
if len(test_str)>len(pattern):
print('不符合')