From: Madu Nar Date: 2006-09-28T09:35:34+09:00 Subject: Re: Search string in HTML file 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 '+''+d_term.chomp+'' 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/.