JSFiddle - React, Tailwind, and code Playground

HTML

<p>http://www.linkedin.com</p>
<div>http://www.twitter.com</div>
<p><a href="http://google.net" />Google</a></p>
<a href="http://www.google.com" />Google</a>
<a href="http://google.net" />Google</a>
<a href="www.google.com" />Google</a>
<a href="http://www.google.org" />Google</a>
<a href="http://www.google.cc" />Google</a>
<a href="http://google.in" />Google</a>
<a href="http://google.edu" />Google</a>

JavaScript

$(function(){
  var linkifiedBody = linkify($('body').text());
  linkifiedBody= $('<div></div>').html(linkifiedBody);
  var links = linkifiedBody.find("a[href]");
  links = links.add($("a[href]"));
  links.each(function(){
      var hrefVal = $(this).attr('href');
    if(isUrl(hrefVal))
        console.log(hrefVal);
  });
});


function isUrl(s) {
    var regexp = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/i;
    return regexp.test(s);
}

function linkify(html) {
  return html.replace(/[^\"]http(.*)\.([a-zA-Z]*)/g, ' <a href="http$1.$2">http$1.$2</a>');
}