I am grabbing text from another site. Once the text is grabbed from another site, I get something like this:
<div id="target">
<p><a href="http://www.example.com/image.png" rel="nofollow">http://www.example.com/image.png</a></p>
<p>More Text blah blah blah</p>
<p><a href="http://www.example.com/image2.png" rel="nofollow">http://www.example.com/image2.png</a></p>
</div>
How can I grab those paragraphs with links to images and replace them with the image itself like by using an img tag so that it replaces all the images it finds with the image itself?