Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用转换为字符串的 html 脚本
如何使用正则表达式将标签中的所有 html 代码替换为空白?
使用相对简单的模式(扩展它可能是个好主意),
import re html = re.sub(r'<.+?>', '', html)