我有很多这样的网址
<a href="http://abc123.linkbucks.com"><img src="http://img187.imagevenue.com/loc1115/th_99189_image_122_1115lo.jpg" /></a>
我需要用 img src 部分替换 href 部分,所以它会说
<a href="http://img187.imagevenue.com/loc1115/th_99189_image_122_1115lo.jpg"><img src="http://img187.imagevenue.com/loc1115/th_99189_image_122_1115lo.jpg" /></a>
然后用 img.php?image= 替换 loc???/th_ 部分,这样就可以了
<a href="http://img187.imagevenue.com/img.php?image=99189_image_122_1115lo.jpg"><img src="http://img187.imagevenue.com/loc1115/th_99189_image_122_1115lo.jpg" /></a>
谁能帮我用 TextWrangler for Mac 做到这一点?linkbucks 链接以及 loc 和 img 位都是随机的。我尝试过搜索,但解决方案似乎非常具体,而且我对正则表达式的理解非常稀缺......谢谢!