ホームページ >バックエンド開発 >PHPチュートリアル >php正则组平衡有关问题
php正则组平衡问题
Compilation failed: syntax error in subpattern name (missing terminator) at offset 46
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->$str = "<div class="a"> <div>cc</div>a<span>ab</span>c<div class="b">xxxy</div> </div>";preg_match_all("#((?'open'<div>]*>)((?:.(?!?div))*.)*?)((?'-open'</div>[^>]*>)((?:.(?!?div))*.)*?)#is",$str,$matches); print_r($matches);