Hi all,
I have this string
<p><img src="http://www.foo.com/bar.jpg"></p><p>other content here</p>
I need to extract the src url . The img tag appears only at the beggining of the string.
Thanks in advance.
Hi all,
I have this string
<p><img src="http://www.foo.com/bar.jpg"></p><p>other content here</p>
I need to extract the src url . The img tag appears only at the beggining of the string.
Thanks in advance.
You can use String.split:
var s:String = "<p><img src=\"http://www.foo.com/bar.jpg\"></p><p>other content here</p>";
var a:Array = s.split('"');
The src url would be the 2nd element of the array, so:
trace(a[1]);