$ echo '<a href="mailto:NA?Subject=AB42525216 - FOOBAR bla bla - bla">NA</a>'
<a href="mailto:NA?Subject=AB42525216 - FOOBAR bla bla - bla">NA</a>
$ echo '<a href="mailto:NA?Subject=AB42525216 - FOOBAR bla bla - bla">NA</a>' | sed 's/SOMEMAGIC/NA/g'
NA
My question: how can I remove the string in the "echo" with SOMEMAGIC? The delimiter could be > I think
sed 's/.*>\(.*\)<.*/\1/'
would work on that particular input. But so wouldcut -d \> -f2- | cut -f\< -f1
– Stéphane Chazelas May 30 at 9:12NA
? – Gnouc May 30 at 9:16