From: daniel hoey Date: 2008-03-17T12:40:01+09:00 Subject: Re: hpricot search help On Mar 17, 10:03 am, Todd Benson wrote: > On Sun, Mar 16, 2008 at 12:30 PM, Junkone wrote: > > hello > > I am trying to grab the table that has a html comment in it. for eg > > > > > > how can i do using search functionality in hpricot. > > > appreciate any help > > There's probably a better way, but without looking at the docs I would > probably find my table and then maybe #inner_html followed with a > regexp. > > For example... > > require "hpricot" > str =
> doc = Hpricot(str) > p doc.search("table").inner_html > > =>"\n" > > It's interesting to note that hpricot picked it out even though that > string is really malformed html. > > Todd I think that this will do it: h = Hpricot('