用JS正则提取字符串的图片地址
上代码:
var urls = [];
var content = '过儿,我西毒欧阳锋一生纵横西域,今日能与七公切磋武艺,<img src="http://iw3c.com/themes/white/style/logo.png" />共葬于这雪山之颠,也算不枉此生!死前我要将毕<img src="http://iw3c.com/themes/white/style/rss.png" />生所学尽相传授与你。';
content.replace(/<img.*?src="(.*?)"[^>]*>/ig, function(a,b) {
urls.push(b);
});
alert(urls.join('n'));