HTML:
<!--a lot of HTML before-->
<div class="quoteheader">
<div class="topslice_quote"><a href="htsomelink">Some text</a></div>
</div>
<blockquote class="bbc_standard_quote">Some text<br />
</blockquote>
<div class="quotefooter">
<div class="botslice_quote"></div>
</div>
<br />
<!--a lot of HTML after-->
我需要:删除 div.quoteheader 和 first <br/>
after 之间的所有内容,因此结果应如下所示:
<!--a lot of HTML before-->
<!--a lot of HTML after-->
我试过了:
$message = preg_replace('/<div\sclass=\"quoteheader\">[^<]+<\/div>/i', '', $string)