python中使用正则表达式查找中文

import re
s = u"你好,世界!"
p = re.compile(r"[\u4e00-\u9fa5]+")
result=p.findall(s)
print(result)

执行结果


posted on 2019-02-26 21:38  lurkera  阅读(1996)  评论(0)    收藏  举报