# Re: parsing HTML code with regex

**URL:** <https://www.ruby-forum.com/t/re-parsing-html-code-with-regex/73470>\
**Category:** Ruby\
**Created:** [October 24, 2006, 8:49pm UTC](https://www.ruby-forum.com/t/re-parsing-html-code-with-regex/73470 "2006-10-24T20:49:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 24, 2006, 8:49pm UTC](https://www.ruby-forum.com/t/re-parsing-html-code-with-regex/73470/1 "2006-10-24T20:49:14Z")

</div>

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
