# Re: parsing HTML code with regex

**URL:** <https://www.ruby-forum.com/t/re-parsing-html-code-with-regex/73479>\
**Category:** Ruby\
**Created:** [October 24, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/re-parsing-html-code-with-regex/73479 "2006-10-24T20:53:18Z")\
**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:53pm UTC](https://www.ruby-forum.com/t/re-parsing-html-code-with-regex/73479/1 "2006-10-24T20:53:18Z")

</div>

From: Gavin K.

> 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
> 
> Er, oops. I mean /\<tr[^\>]\*\>/ of course, to match the no-attribute row as  
> well.
