http://qs321.pair.com?node_id=11116482


in reply to Why a regex *really* isn't good enough for HTML and XML, even for "simple" tasks

Just for fun, here's a low-level solution using vanilla HTML::Parser.