Let's say I have a URL:
http://something.com/somethingheretoo
and I want to get what's after the 3rd instance of /
?
something like the equivalent of indexOf()
which lets me input which instance of the backslash I want.
If you know it starts with http://
or https://
, just skip past that part with this one-liner:
var content = aURL.substring(aURL.indexOf('/', 8));
This gives you more flexibility if there are multiple slashes in that segment you want.