Answers for "remove hostname from url javascript"

0

remove hostname from url javascript

var URL = "http://localhost:7001/www.facebook.com";
var newURL = URL.replace (/^[a-z]{4,5}\:\/{2}[a-z]{1,}\:[0-9]{1,4}.(.*)/, '$1'); // http or https
alert (newURL);
Posted by: Guest on October-08-2021

Code answers related to "remove hostname from url javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language