sed delete range

Hi

I would like to delete ranges of text from an html file;
In the sentence; aqua>Stroomprobleem in Hengelo verholpen <a href="107-01.html"><font color=yellow>107</a>

With several sentences like this in that file, where the text between <a href a> varies, so it needs to be deleted in the range from <a till a>.

I tried;

sed -n '\<a\,\a>\s \#.*\ \g' [file-name].html

replacing it with nothing but this doesn't do anything, what am I doing wrong?
(bit of a noob here, so probably something stupid :stuck_out_tongue:

You mean you want to delete the link, defined between '<a href' and '</a>' tags, right? Use sed's 's' command (substitute)
Here:

$ echo 'aqua>Stroomprobleem in Hengelo verholpen <a href="107-01.html"><font color=yellow>107</a>' | sed 's!<a href.*</a>!!'
aqua>Stroomprobleem in Hengelo verholpen

The exclamation marks are delimiters, and any char will do, as long as there is exactly three of them there.
Beware, however, that pattern matching is greedy; so if you happen to have more links on one line, it will eat up everything between the first '<a href' and the last '</a>':

$ echo 'Beginning<a href="whatevah">link1</a>This is eaten too<a href="again">link2</a>end of line' | sed 's!<a href.*</a>!!'
Beginningend of line

Thanks, worked like a charm.