JSFiddle - React, Tailwind, and code Playground
HTML
<div>URLs are: <span id="r"></span></div>
http://google.com/ is a cool site but so is http://coolsite.co.uk/ and also what you need is to check out fakeurl.edu but that's a https://realprivateurl.info just so you know!
CSS
#r { background: yellow; }
JavaScript
var searchText = $('body').text(),
urls = searchText.match(/\b(http|https)?(:\/\/)?(\S*)\.(\w{2,4})\b/ig);
for (var i = 0, il = urls.length; i < il; i++) {
var $r = $('#r'),
rh = $r.html();
$r.html(rh + urls[i] + ', ');
}