From: Gregory Seidman Date: 2008-03-01T12:34:38+09:00 Subject: Re: Scan HTML On Sat, Mar 01, 2008 at 12:22:12PM +0900, Tom Arra wrote: > So I am new to Ruby scripting so I am not sure if this is possible or > not. I want to make a script that will load a webpage and then search > through the HTML of that page until it hits a certain tag. Once it hits > that tag it need to grab all of the text between the tag and the > appropriate end tag. Is something like this possible? > > Example > > >

test

> > > > I want the script to return "test" You want the Hpricot gem. require 'rubygems' require 'hpricot' html = <

test

EOF doc = Hpricot(html) puts (doc/'h3').first.inner_text --Greg