日期:2014-05-17 浏览次数:20510 次
<?php
$str = '<p>元<a target="_blank" href="http://www.trjcn.com/news/news--type-list/cid-21/industry_id-14.html">半导体材料</a><a target="_blank" href="http://www.trjcn.com/news/news--type-list/cid-21/industry_id-14.html">半导体</a>制造厂,导体导体导体导体导体<a target="_blank" href="http://www.trjcn.com/news/news--type-list/cid-21/industry_id-14.html">半导体</a></p>';
$str = preg_replace('/(导体)(?!(:?[^<]
------解决方案--------------------
<(?!a)[^>]*>)*<\/a>)/imu', '<a>$1</a>', $str);
echo $str;