php正则组平衡问题
Compilation failed: syntax error in subpattern name (missing terminator) at offset 46
- PHP code
<!---ecms 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'><p style="color:transparent">本文来源gao!%daima.com搞$代*!码$网3</p><strong>搞代gaodaima码</strong>xxxy</div></div>";preg_match_all("#((?'open'<div>]*>)((?:.(?!</?div))*.)*?)((?'-open'</div>]*>)((?:.(?!</?div))*.)*?)#is",$str,$matches); print_r($matches);
请教一下,是不是PHP 不支持组平衡啊
——解决方案——————–
“#((?’open’
]*>)((?:.(?!</?div))*.)*?)((?:'-open'
]*>)((?:.(?!</?div))*.)*?)#is",