javascript remove http https links from string code example Example: how to remove https link from javascript result = url.replace(/(^\w+:|^)\/\//, '');