From: Daniel Sheppard Date: 2007-09-26T14:36:35+09:00 Subject: Re: ruby regex on html file > > Your subject says regex, but your request says Hpricot: > > > > require 'hpricot' > > doc = Hpricot(input) > > scripts = (doc/'script').map {|x| x['src']}.compact > > Ahh, that looks beautiful right there! But will hpricot work on > a .rhtml file? Probably - Hpricot should treat all the rhtml guff as if you're just really really bad at writing html and treat the rhtml bits as just raw. Hpricot('<%=