My goal is to find all strings that match www.website.com or website.com.
If that address is not currently linked, then replace any matched string with...
<a href="https://www.website.com">www.website.com</a>
or
<a href="https://www.website.com">website.com</a>
Here's what I have so far...
document.body.innerHTML = document.body.innerHTML.replace(/website.com/g, '<a href="https://www.website.com">www.website.com</a>');
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam minima, www.website.com suscipit expedita excepturi laboriosam website.com nesciunt accusantium quae placeat ex nostrum esse corrupti nisi hic velit commodi molestiae.</p>
But, I can't seem to account for addresses that already have the www in front of it.