From: William James Date: 2008-03-02T03:50:04+09:00 Subject: Re: Scan HTML Tom Arra wrote: > William James wrote: > > On Mar 1, 7:56 am, Tom Arra wrote: > >> >> require 'net/http' > >> > So far I think this is closest to what I am looking for. I need to go to > >> > >> I want to pull just the 7.0.0.3.4 and none of the words. I am sure this > >> is going to have to deal with more regular expressions but I never > >> really understood how to use them well. > >> -- > >> Posted viahttp://www.ruby-forum.com/. > > > > E:\>irb --prompt xmp > > s = "

blah blah 7.0.0.3.4 blah

" > > ==>"

blah blah 7.0.0.3.4 blah

" > > # Find a substring composed of numerals and dots that is > > # at least 3 characters long. > > s[ /[\d.]{3,}/ ] > > ==>"7.0.0.3.4" > > Your really good at this stuff! One thing i noticed is that it works > perfectly for the regular domain but as soon as I put a full URL into > the Net::HTTP.new command it starts to throw errors. Any ideas. Use the rest of the URL as the argument for ".get()": require 'net/http' puts Net::HTTP.new('www.newlisp.org').get('/index.cgi?Documentation'). body[ %r{(.*?)}mi, 1 ]