Hello,
I may have URLs like:
and what I would like to do is to remove part before /foo/bar/, with regex which will work if I have IP/something, IP:PORT/something or DOMAIN/something
Tnx!
Hello,
I may have URLs like:
and what I would like to do is to remove part before /foo/bar/, with regex which will work if I have IP/something, IP:PORT/something or DOMAIN/something
Tnx!
If you have always absolute URLs (beginning with the URL scheme), try this:
url.replace(/^[^\/]*(?:\/[^\/]*){2}/, "")