上代码:
<span class="kwd">var</span><span class="pln"> urls </span><span class="pun">=</span><span class="pln"> </span><span class="pun">[];</span><span class="pln"></p><p></span><span class="kwd">var</span><span class="pln"> content </span><span class="pun">=</span><span class="pln"> </span><span class="str">'过儿,我西毒欧阳锋一生纵横西域,今日能与七公切磋武艺,<a href="http://www.codeclip.com" target="_blank"><img src="http://meikaiyanxiao.com/</span></a><span class="str">theme</span><span class="str">s/white/style/logo.png" />共葬于这雪山之颠,也算不枉此生!死前我要将毕<a href="http://www.codeclip.com" target="_blank"><img src="http://meikaiyanxiao.com/themes/white/style/rss.png" /></a>生所学尽相传授与你。'</span><span class="pun">;</span><span class="pln"></p><p>content</span><span class="pun">.</span><span class="pln">replace</span><span class="pun">(</span><span class="str">/\<a href="http://www.codeclip.com" target="_blank"><img.*?src\=\"(.*?)\"[^></a>]*>/</span><span class="pln">ig</span><span class="pun">,</span><span class="pln"> </span><span class="kwd">function</span><span class="pun">(</span><span class="pln">a</span><span class="pun">,</span><span class="pln">b</span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln"></p><p> urls</span><span class="pun">.</span><span class="pln">push</span><span class="pun">(</span><span class="pln">b</span><span class="pun">);</span><span class="pln"></p><p></span><span class="pun">});</span><span class="pln"></p><p>alert</span><span class="pun">(</span><span class="pln">urls</span><span class="pun">.</span><span class="pln">join</span><span class="pun">(</span><span class="str">'\n'</span><span class="pun">));</span>