From: Todd Benson Date: 2008-03-17T08:03:39+09:00 Subject: Re: hpricot search help 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