I want to replace part of the URL with JavaScript but stupid regex is giving me headaches. I want to switch from this:
http://website.com/test.html/post/something-else/
to this:
http://website.com/post/something-else/
Any ideas? Thanks!
I want to replace part of the URL with JavaScript but stupid regex is giving me headaches. I want to switch from this:
http://website.com/test.html/post/something-else/
to this:
http://website.com/post/something-else/
Any ideas? Thanks!
Use replace() function