Andy Booth
06-08-2007, 11:22 AM
Hi
I've spent ALL morning trying to get this to work, hope someone on here can help me!
Ok, I have a string retrieved from a database that contains some HTML-formatted text. What I want to do is search through this text for all images and extract the URL's from them. So if the string consisted of...
blah blha blah <img src="http://www.mysite.com/image.jpg" /> blah blah blah
Then I want to have the value http://www.mysite.com/image.jpg in a variable. I see what I have to do...search for all occurences of words that start with src=" and end with .jpg" and get the value out of the middle, but just can't suss out the way to make it work! Please help! :)
Thanks
AB
I've spent ALL morning trying to get this to work, hope someone on here can help me!
Ok, I have a string retrieved from a database that contains some HTML-formatted text. What I want to do is search through this text for all images and extract the URL's from them. So if the string consisted of...
blah blha blah <img src="http://www.mysite.com/image.jpg" /> blah blah blah
Then I want to have the value http://www.mysite.com/image.jpg in a variable. I see what I have to do...search for all occurences of words that start with src=" and end with .jpg" and get the value out of the middle, but just can't suss out the way to make it work! Please help! :)
Thanks
AB