mmm something like this?

url1 = Whatever...
MT = 'Search '+'<b>'+d_term.chomp+'</b>'
if (open(url1).find { |line| line.match(MT) } != nil)
    foo = File.open("c://abc.txt", "a+")
    foo.puts ("Found: " + line)
    foo.close()
end

On 9/28/06, Madu Nar <bharadwaj.n / gmail.com> wrote:
> Jean Verger wrote:
> > thanks ... simple and efficient :) it works
> >
> > thanks,
> >
> > Jean
>
> Hello there,
>   I am a newbie to Ruby and Watir.
> Currently, me trying to extract a parameter from the html page. But the
> Value I am trying to extract keeps changing and depends on the input.
> Here is the piece of code I tried which did not work...
>
> require 'open-uri'
> require'watir'
> require 'fileutils'
> require 'net/http'
>
> d_term = "Banks"
>
>    url1 = Whatever...
>    MT = 'Search '+'<b>'+d_term.chomp+'</b>'
>            open(url1).find {|line|
>            if line.match(MT)
>            foo = File.open("c://abc.txt", "a+")
>            foo.puts ("Found: " + line)
>            foo.close()
>            end
>
> Any help greatly appreciated.
>
> Thanks,
> Madu
>
> --
> Posted via http://www.ruby-forum.com/.
>
>