in reply to Quick regex for finding something in an OPTION tag
Parsing HTML correctly is non-trivial. You might find it better to use one of the existing modules for parsing the HTML. HTML::Parser and HTML::TreeBuilder come to mind.