有关使用sed获取HTML内容的问题 [英] Question about using sed to get HTML content
本文介绍了有关使用sed获取HTML内容的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用sed修剪HTML标记,
但是,我发现某些标签占用了两个行空间,我不知道如何修剪这些标签..
任何人都有线索〜?
I tried to trim the HTML Tag by using sed,
However, I find that some tag takes up two line space, I have no idea how to trim those Tags..
Anyone has a clue~?
推荐答案
在我们的老朋友Google的帮助下,您会找到以下信息:
# remove most HTML tags (accommodates multiple-line tags)
sed -e :a -e ''s/<[^>]*>//g;/</N;//ba''
在该站点上:便捷的SED单线版 [
With a little help of our old friend Google, you''d have found this:
# remove most HTML tags (accommodates multiple-line tags)
sed -e :a -e ''s/<[^>]*>//g;/</N;//ba''
at that site:Handy one-liners for SED[^]
这篇关于有关使用sed获取HTML内容的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文