try
{
var str='<P>xczxzxzxcxcxc<IMG src="http://file.ynet.com/2/1612/12/12119048.jpg" mce_src="http://file.ynet.com/2/1612/12/12119048.jpg">dfsd<IMG src="http://file.ynet.com/2/1612/12/12119048.jpg" mce_src="http://file.ynet.com/2/1612/12/12119048.jpg">sdfs</P>';
s=str.match(/<imgs*src="([^"]*?)"[^>]*>/gi);
s2=str.split(/<imgs*src="([^"]*?)"[^>]*>/gi);
//document.write(s);
for(var i= 0;i<s.length;i++)
{
document.write(s[i]);
document.write('<br/>')
document.write(RegExp.$1);
}
for(var i= 0;i<s2.length;i++)
{
document.write(s2[i]);
document.write('<br/>')
}
}
catch(e)
{
alert(e);
}