日期:2014-05-17  浏览次数:20624 次

一个网页的图片名的截取
网页的代码里很多:

HTML code
<a href="/index.php/Image:EISL_1.1.6.gif" class="image" title="Image:EISL 1.1.6.gif"><img src="/images/0/04/EISL_1.1.6.gif" alt="Image:EISL 1.1.6.gif" width="648" height="486" longdesc="/index.php/Image:EISL_1.1.6.gif" /></a>
<br />
铺砌搅拌的均质池
<br />
<a href="/index.php/Image:EISL_1.1.7.gif" class="image" title="Image:EISL 1.1.7.gif"><img src="/images/d/da/EISL_1.1.7.gif" alt="Image:EISL 1.1.7.gif" width="945" height="685" longdesc="/index.php/Image:EISL_1.1.7.gif" /></a>
<br />
穿孔导流槽式均质池
<br />
<a href="/index.php/Image:EISL_1.1.8.gif" class="image" title="Image:EISL 1.1.8.gif"><img src="/images/e/e9/EISL_1.1.8.gif" alt="Image:EISL 1.1.8.gif" width="586" height="275" longdesc="/index.php/Image:EISL_1.1.8.gif" /></a>

我现在只需要得到图片名(EISL 1.1.6.gif),该怎么做呢?
用正则截取还是别的什么办法呢?求指导


------解决方案--------------------
$contents = preg_replace('/poweredby_mediawiki_88x31\.png/s','',$contents); //加一步,过滤掉它。