in reply to Pulling all instances of a regex out

Don't parse HTML with regexen. Use a parser. Look at HTML::Parser. HTML::TableParser may also be useful.

Caution: Contents may have been coded under pressure.
  • Comment on Re: Pulling all instances of a regex out