小编Rus*_*hta的帖子

如何在Python中使用Regex删除HTML注释

我想从HTML文本中删除HTML注释

<h1>heading</h1> <!-- comment-with-hyphen --> some text <-- con --> more text <hello></hello> more text
Run Code Online (Sandbox Code Playgroud)

应导致:

<h1>heading</h1> some text <-- con --> more text <hello></hello> more text
Run Code Online (Sandbox Code Playgroud)

python regex

5
推荐指数
3
解决办法
4431
查看次数

标签 统计

python ×1

regex ×1