I'm pretty new to Javascript and couldn't find an answer to what I was looking to do. Here's what I have.

I'm getting a url from a page that is sometimes in the format of this: `http://url1.come/http://url2.com/dir/some/file.html`

What I'd like to do is strip the first part off (`http://urlhere.come/`) and return just the 2nd part which would be: `http://anotherUrlHere.com/dir/some/file.html`.

In order to be robust, I'd rather not specifically look for `url1.com` since that may change in the future. What will not change, however, is that there are two occurences of `http:` so I'd think that the best way would be to find the 2nd occurence of `http` and then strip off everything before that. I'm just now sure how.

What would be the best way to accomplish this? Thanks.