3 ms·
Fine, until the next row doesn't have <b></b> tags. So the $5 no longer matches where it should. I'm just suggesting easier syntax, and a custom tool. Like dd
by peterburkimsher 10y ago
Fine, until the next row doesn't have <b></b> tags. So the $5 no longer matches where it should.
I'm just suggesting easier syntax, and a custom tool. Like dd is for disk copying, instead of cp/gzip/etc. A simple tool that will just work.
This is the syntax I'm going for:
textBetween("<td>", "</td>") | replace ("<b>", "") | replace ("</b>", "")
Maybe with some magic strings,
e.g. textBetween(":", "end")
- protomikron 10y agoYeah you are right, but if the input is more sophisticated I would probably use a scripting language and its full-fledged XML parser. Your replace part is already covered by sed (although I agree with you that the escaping can be awkward).