我需要使用preg_replace删除整个。不幸的是,我不能在这里使用任何PHP Dom设施,因为它是我未编码的脚本的一部分
<div class="box" id="idxFeach" style="">
<h2 class="gr"><div hint="Refresh" onclick="xEvent.frameLoad('#popularBox','/viewFrame.php?'+Math.random()); return false;" class="icon iconRefresh"></div>Featured</h2>
<div class="boxC">
<iframe frameborder="no" align="middle" scrolling="no" src="/viewFrame.php?1381845110781" allowtransparency="true" marginheight="0" marginwidth="0" id="popularBox"></iframe>
<div class="loader" style="display: none;"></div>
</div>
</div>
我需要删除整个
<div class="box" id="idxFeach" style=""> .. </div>
非常感谢
答案 0 :(得分:1)
preg_replace
使用生成有限自动机的正则表达式引擎,因此无法搜索常规嵌套表达式。更多信息: