JSFiddle - React, Tailwind, and code Playground
HTML
<div>here's a link to www.facebook.com: http://www.facebook.com</div>
<div>here's another link to just facebook.com: http://facebook.com</div>
JavaScript
$(function() {
var re = new RegExp("(http:\/\/(?:www\.)?facebook.com)","gi");
$("body").html($("body").html().replace(re, "<a href='$1/chitralekha.in'> chitralekha.in </a>"));
});