时间:2021-07-01 10:21:17 帮助过:39人阅读
<?php /** * create by tuzwu@qq.com for 小桔灯www.xiaojudeng.com */ $string='My String <span class="infolist"><a class="info" href="http://www.xiaojudeng.com/">小桔灯信息网 adfadf adsf fgsdfg </a></span><span>分类信息</span>'; $string = preg_replace('/(<span class="infolist">).*?(<\/span>)/is', '', $string); echo $string; ?>