<a class="topic-text" href="http://tieba.baidu.com/hottopic/browse/hottopic?topic_id=278032&topic_name=%E6%97%A5%E6%9C%AC%E8%A7%84%E5%AE%9A%E5%9D%90%E8%BF%87%E5%B1%B1%E8%BD%A6%E7%A6%81%E6%AD%A2%E5%B0%96%E5%8F%AB" target="_blank">日本规定坐过山车禁止尖叫</a>
a="""string"""
pattern=r'[\u4e00-\u9fa5]+'
print(re.findall(pattern,a))
这里\u4e00-\u9fa5是汉字unicode范围
这样有一个问题,举例
<a>日本规定hhhh坐过山车禁止尖叫</a>
匹配返回结果["日本规定","坐过山车禁止尖叫"]
如果你要抓取的内容只在< a>< /a>中间,建议你的正则去匹配">< /a>"中间部分
pattern=r'>(.*)</a>'
print(re.findall(pattern,a))
关于字符的unicode范围,你可以看下这篇