On Sun, Dec 2, 2012 at 7:50 AM, Pierre-Andre M. <lists / ruby-forum.com> wrote:

> here is a sample url https://api.github.com/repos/orgName/final
>
> I want to extract "orgName" from it

1.9.3 (main):0 >
URI.parse("https://api.github.com/repos/orgName/final").path.split('/')[2]
=> "orgName"
1.9.3 (main):0 >

HTH!
-- 
Hassan Schroeder ------------------------ hassan.schroeder / gmail.com
http://about.me/hassanschroeder
twitter: @hassan