And as for CDATA sections, most people without an SGML background don't even know what they do, and don't have them in their HTML as a rule.
You mean people who put SCRIPT or STYLE elements in their HTML have an SGML background? Wow, SGML is far more popular than I thought.
Plus in absence of evidence to the contrary, the person is in control of the HTML and has a pretty good idea of what's in there.
He may, but we don't. He didn't tell us what's in the HTML file. It's easy to just assume things, but I can play that game as well. Just assume there's no <u> present and do nothing! Assuming things without stating what you assume is pointless. Furthermore, the OP asks whether the trivial regex is the best way, or if there's another way. Hence that my answer starts with For general HTML files. Besides, if the OP is really in control of what's in the HTML files, the best answer is to not put in stuff in the files that you don't want to have there.
Abigail
In reply to Re: Removing underline tags with regexp (is a good idea)
by Abigail-II
in thread Removing underline tags with regexp
by Tricky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |