re中文匹配


Pattern = re.compile(u'[\u4e00-\u9fa5]+')
if Pattern.search(searchstring):
   # do something
else:
   # do something
posted @ 2024-06-11 18:20  醒日是归时  阅读(4)  评论(0编辑  收藏  举报