我将如何在所有这些标签和符号之间获取以下标题文本?
我需要抓住的东西:
Some Title Here v1.2.3 Some Other Description About the Title in Here
示例源代码:
<body><pre>=============================================================
Some Title Here v1.2.3 Some Other Description About the Title in Here
=============================================================
some other data here but I don't care about it ...
</pre></body></html>
我试过这样做,但它甚至在 pre 标签之前也抓住了整个顶部,但下面的部分似乎工作正常,除了它也抓住 = 符号。
sed -n '/<pre>=/,/=/p
上述 sed 代码的结果是:
<body><pre>=============================================================
Some Title Here v1.2.3 Some Other Description About the Title in Here
=============================================================
任何有关此的反馈都将受到欢迎。非常感谢,一如既往,StackOverflow 是 Q 和 A 的最佳社区 =)