JSFiddle - React, Tailwind, and code Playground
HTML
<div>URLs are: <span id="r"></span></div>
some tweet text goes here https://t.co/CTyPa0sYmp
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] + ', ');
}