I am trying to figure out how to look through a string and replace any word which ends at ".com" at the end with a valid url link.
for example: "google.com has launces a .." will be replaced with
"<.a href='google.com'>google.com <./a> has launches .."
// I tried following code, but it only works for finding word which starts with "www."
data.rows[j].content = data.rows[j].content.replace(
/(^|<|\s)(www\..+?\..+?)(\s|>|$)/g,'<a href="https://$2" target="_blank">$2</a>'
)