JSFiddle - React, Tailwind, and code Playground

HTML

<p id="test"></p>

JavaScript

$(document).ready(function() { 
    var str = "http://www.google.co m, https://www.google.com";
    var res = str.replace("https", " ");
    $('#test').html(res);
});