in reply to Finding and replacing 'nonvalid' html tags?

You might want to investigate HTML::TagFilter which makes this pretty easy.

Or simply use HTML::Parser, writing a handler for start/end tags and only outputting ones you want (examples are here).

Update:
If you wanted a list of valid HTML tags, you could look at HTML::Tagset and %HTML::Tagset::isKnown

gav^

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.