0

I have a variable that stores html code for a webpage. The html code may includes a set of urls, some of these urls are linked using the anchor tag but other may not linked using the tag.

How can I select the unlinked urls to replace them with a linked version.

Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore
magna https://www.google.com aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip
Duis aute <a href="https://www.google.com">google.com</a>
irure dolor in reprehenderit in voluptate velit esse

<a href="https://www.google.com">google.com</a>
https://www.google.com
faressoft
  • 19,053
  • 44
  • 104
  • 146

0 Answers0