in reply to ugly regex question
I think you can save yourself a lot of pain by using HTML::TableExtract.