Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

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?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" 

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" 

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" 
Source Link
erlingormar
  • 461
  • 3
  • 11

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"