【发布时间】:2020-06-19 12:50:25
【问题描述】:
我尝试了一些方法,但我无法做到。
sed -e "s/<!---* *<\(.*\)> *-->/<\1>/" test.html
我在这里找到了,但我不知道如何继续。
【问题讨论】:
-
这能回答你的问题吗? Sed remove tags from html file
-
让 perl 与你同在 - `perl -0777 -pe 's/<.>//sg' test.html
-
如果你想删除空行那么
perl -0777 -pe 's/<.*?>//sg;s/\s+\n+/\n/g' test.html -
我只能使用 sed :/