From: Jan Svitok Date: 2006-09-22T20:26:39+09:00 Subject: Re: Search string in HTML file On 9/22/06, Jean Verger wrote: > Hi, > I'm looking the way of searching an string in a HTML file given the URL. > > The parameter will be "value" ... it has to be that > format, exactly. > > I'm trying with Hpricot (http://code.whytheluckystiff.net/hpricot) > which is very powerfull ... but it searches for elements, so i only > can pass the value of the SPAN .. no the whole string. > > anyway of searching for an string in a html file given the URL? > > thanks, > > Jean Will this do it? (I have not run it, so there may be errors.) require 'open-uri' uri = URI.parse('http://whatever') data = uri.read data.scan('whatever')