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.
let s = 'http://something.com/somethingheretoo';
parts = s.split('/');
parts.splice(0, 2);
return parts.join('/');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With