I need some help from JavaScript developers
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.
for example
<div class="messages"> hello my friend this is your link https://strackoverflow.com see you later </div>
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