[Note: parts of this message were removed to make it a legal post.]
On 24/02/2008, Luca Roma <> wrote:
>
> I have a string that content a link of a youtube page .
> Like:
> http://it.youtube.com/watch?v=PupR5V9aE2s&test=1
irb(main):001:0> require 'uri'
=> true
irb(main):002:0> res = URI.split('
http://it.youtube.com/watch?v=PupR5V9aE2s&test=1')
=> ["http", nil, "it.youtube.com", nil, nil, "/watch", nil,
"v=PupR5V9aE2s&test=1", nil]
gives you an array of:
* Scheme
* Userinfo
* Host
* Port
* Registry
* Path
* Opaque
* Query
* Fragment
-Thomas