음, 다른 방법 (음 ... 또는 오히려 작동하는 방법)이 있지만, 질문은 왜 이것이 실패합니까?괄호로 묶은 부분 문자열이 포함 된 문자열과 일치하는 PCRE (재귀) 패턴입니다. 왜 이것이 실패할까요?
/
\A # start of the string
( # group 1
(?: # group 2
[^()]* # something other than parentheses (greedy)
| # or
\((?1) \) # parenthesized group 1
) # -group 2
+ # at least once (greedy)
) # -group 1
\Z # end of the string
/x
중첩 된 괄호가있는 문자열과 일치 실패 : "(())"