Let\'s say I have a URL:
http://something.com/somethingheretoo
and I want to get what\'s after the 3rd instance of /?
/
Here's a very cool way of handling this: How can I remove all characters up to and including the 3rd slash in a string?
My preference of the proposed solutions is
var url = "http://blablab/test/page.php"; alert(url.split("/")[3]); //-> "test"