From: John Ydil Date: 2010-03-04T16:35:01+09:00 Subject: Re: Url parsing in ruby Brian Candler wrote: > John Ydil wrote: >> my URL looks like http://localhost/mypage.rbx?var=nas002001 > >>> require 'rubygems' > => true >>> require 'rack' > => true >>> require 'uri' > => false >>> u = URI.parse("http://localhost/mypage.rbx?var=nas002001") > => # URL:http://localhost/mypage.rbx?var=nas002001> >>> Rack::Utils.parse_query(u.query) > => {"var"=>"nas002001"} >>> I knew URI.parse but to use it, you need to know the URL. In my case, i need to parse the URL in the web browser,in the address bar, not a given URL. Or maybe there's something a don't understand about how to use it. -- Posted via http://www.ruby-forum.com/.