From: Phil Hagelberg Date: 2005-10-27T02:38:50+09:00 Subject: Re: Getting IP addresses On Thu, 2005-10-27 at 02:26 +0900, Joel Watson wrote: > require 'open-uri' > > page = URI.parse("http://www.whatismyip.com") > > html = page.read > > ip = html.scan(/.*?([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9] > {1,3}).*/).flatten.first Sweet--it's a bit more portable than just pulling it out of system("ifconfig"). But why do you need it? -Phil