使用:[u4e00-u9fa5]进行中文匹配
[u4e00-u9fa5]
import re # 只匹配一个 # mo = r'[u4e00-u9fa5]' # s = '我爱中国,I LOVE YOU' # print(re.search(ms,s)) # 连续匹配 # mo = r'[u4e00-u9fa5]+' # s = '我爱中国,I LOVE YOU' # print(re.findall(ms,s))