From: Redd Vinylene Date: 2009-04-30T21:50:24+09:00 Subject: Re: View Source Code in Whois.net --0015174bee706230350468c50b4b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit gsub!(/>\s+<') maybe? On Thu, Apr 30, 2009 at 1:42 PM, Chris Berry wrote: > I am trying to view the source code in whois.net using the following > code: > > > require 'open-uri' > open("http://whois.net/whois/qoxax.com") {|f| > text = f.read > lines = f.readlines > text = lines.join > text.gsub!(/\s+/," ") > > puts text > > } > > The whois.net view source has TONS of whitespace at the beginning and > end which I am guessing is causing this to come up blank when I run this > code but perhaps you have better ideas / luck? > -- > Posted via http://www.ruby-forum.com/. > > -- http://www.home.no/reddvinylene --0015174bee706230350468c50b4b--