title: how to put links in tag a with js
body: <p>I need some help from JavaScript developers</p>
  <p>I have a chat box where I send their own message with the input, and they may send a link along with the message, and I want to put the links that are sent next to the messages in a tag so that they can be clicked.</p>
  <p>for example</p>
  <pre><code> &lt;div class=&quot;messages&quot;&gt; hello my friend this is your link  https://strackoverflow.com  see you later &lt;/div&gt;
  </code></pre>
  <p>Now I want to select all the divs that have the messages class
  And check its string if it contains http and there is a space at the end of http
  Put that part of the link inside the a tag with target _blank</p>