标签:pps att back track port round div val rac
主流的匹配字符有两种 [\u4e00-\u9fa5]和[\u2E80-\u9FFF],后者范围更广,包括了日韩地区的汉字
import re
pattern = re.compile("[\u2E80-\u9FFF]+")
result = pattern.findall(‘<a target="_blank" href="http://m.weibo.com/web/cellphone.php#iphone" suda-uatrack="key=‘
‘index_new_menu&value=sina_apps_list_click">新浪微博</a>‘)
print(result)
[‘新浪微博‘]
标签:pps att back track port round div val rac
原文地址:https://www.cnblogs.com/jeavy/p/11280337.html