Home > Backend Development > PHP Tutorial > php正则组平衡有关问题

php正则组平衡有关问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:01:39
Original
866 people have browsed it

php正则组平衡问题
Compilation failed: syntax error in subpattern name (missing terminator) at offset 46

PHP code
<!--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);
Copy after login
 

请教一下,是不是PHP 不支持组平衡啊

------解决方案--------------------
"#((?'open'
]*>)((?:.(?!?div))*.)*?)((?:'-open'
[^>]*>)((?:.(?!?div))*.)*?)#is",
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Float a div inside another div
From 1970-01-01 08:00:00
0
0
0
javascript - div carousel issue
From 1970-01-01 08:00:00
0
0
0
Div captures mouse scroll
From 1970-01-01 08:00:00
0
0
0
How to make a div appear below another div in CSS
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template