昏睡小白菜

文章
9
资源
0
加入时间
3年1月8天

Python3 提取中文的正则表达式

import re# 测试文本test = '<h1>hello 你好, world 世界</h1>'# 中文匹配正则chinese_pattern = '[\u4e00-\u9fa5]+'says = re.findall(chinese_pattern, test)# 输出提取的内容hi = ''for say in says: # pri...