Re: parsing HTML code with regex

From: Anthony W.

Sent: Tuesday, October 24, 2006 12:35 PM
I’m trying to count and print each

and <tr ‘something’>.

Do you just want to match the “

”, or do you want to match the
“ …”?

Assuming the former:
row_tags = op_file.scan( /<tr[^>]+>/ )
p row_tags, row_tags.length