http://www.perlmonks.org?node_id=11125271


in reply to regex in perl

Definitely use "a proper HTML parser." You'll be glad you did.

But also, be aware of CPAN modules such as Regexp::Common. (In fact, there are quite a few modules in the "Regexp" family. Very many patterns have already been thoroughly done.)