php 正規表現置換、なぜ
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <?php $page = '<!-- WebAppleHeader --><div class="sheader"></div><!-- /WebAppleHeader --> 阿萨德发射点发射得分 <!-- WebAppleIndexBanner --> <img src="/images/sinaapp/img/example1.png" class="sbanner"/> <!-- /WebAppleIndexBanner -->'; [b]//替换内容 $local_replace_area[0] = 'replace_area_1<hr>'; //这里替换不了? $patterns[0] = "/^<!-- WebAppleHeader -->[\s\S]*<!-- \/WebAppleHeader -->$/i";//这里替换不了?[/b] $page = preg_replace($patterns, $local_replace_area, $page); echo $page; ?>