: Try s/<.*>//g - the . means "any character" and will eliminate a
: less-than, then 0 or more characters, then a greater than.
Careful: if there's more than one greater-than in the line, this regex
will wipe out everything between (and including) the first "<" and the
last ">" on the line, because Perl matches are greedy by default. For
example, in this line,
<a href="foo">foo</a>
the regex will delete everything from the first "<" in "<a " to the
last ">" in "/a>".
If, on the other hand you direct the regex to match the shortest line
("<.*?>"), then it will wipe out only the tags and leave the text.
(Probably should have expanded on that in my last post.)
--
Tim Kimball · ACDSD / MAST ¦
Space Telescope Science Institute ¦ We are here on Earth to do good to others.
3700 San Martin Drive ¦ What the others are here for, I don't know.
Baltimore MD 21218 USA ¦ -- W.H. Auden