remove https froma copied url in js code example Example: how to remove https link from javascript result = url.replace(/(^\w+:|^)\/\//, '');