how to remove https link from javascript

JavaScript
result = url.replace(/(^\w+:|^)\/\//, '');
Source

Also in JavaScript: