Home > Article > Backend Development > 正则过滤html中的第一个p标签
问:应该怎么用正则过滤掉第一对p标签以及里面的内容
<div class="content"> <p class="sherry_labels" style="margin:0 ;"> <a href="http://zj.admin5.com/" target="_blank">中介交易</a> <a href="http://seo.admin5.com/seozhenduan/" target="_blank">SEO诊断</a><a href="http://www.admin5.net/forum-494-1.html" title="淘宝客" target="_blank">淘宝客</a> <a href="http://www.etuan.com/" target="_blank">站长团购</a> <a href="http://yun.admin5.com/" title="云主机" target="_blank">云主机</a> <a href="http://v.admin5.com/" title="A5外包" target="_blank">A5外包</a> </p><p>222</p><p>333</p><p>444</p></div>
$s =<<< TXT<div class="content"> <p class="sherry_labels" style="margin:0 ;"> <a href="http://zj.admin5.com/" target="_blank">中介交易</a> <a href="http://seo.admin5.com/seozhenduan/" target="_blank">SEO诊断</a><a href="http://www.admin5.net/forum-494-1.html" title="淘宝客" target="_blank">淘宝客</a> <a href="http://www.etuan.com/" target="_blank">站长团购</a> <a href="http://yun.admin5.com/" title="云主机" target="_blank">云主机</a> <a href="http://v.admin5.com/" title="A5外包" target="_blank">A5外包</a> </p><p>222</p><p>333</p><p>444</p></div>TXT;echo preg_replace('##isU', '', $s, 1);
<div class="content"> <p>222</p><p>333</p><p>444</p></div>