From: Tom Arra Date: 2008-03-01T21:44:27+09:00 Subject: Re: Scan HTML William James wrote: > On Feb 29, 9:22 pm, Tom Arra wrote: >> >> >> >> I want the script to return "test" >> -- >> Posted viahttp://www.ruby-forum.com/. > > require 'net/http' > puts Net::HTTP.new('www.google.com').get('/'). > body[ %r{(.*?)}mi, 1 ] > > If the tag can contain attributes, e.g., > : > > require 'net/http' > puts Net::HTTP.new('www.google.com').get('/'). > body[ %r{<title(?:\s*|\s+.*?)>(.*?)</title\s*>}mi, 1 ] So far I think this is closest to what I am looking for. I need to go to a website that has a server information and pull that out of the HTML. Then take that info and spit it back out to the user. If I am understanding the code above, it at least does the first part which I had no clue how to do. -- Posted via http://www.ruby-forum.com/.