Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在PHP.net的示例中,它表示/(?:\D+|<\d+>)*[!?]/匹配的正则表达式foobar foobar foobar会引发PREG_BACKTRACK_LIMIT_ERROR错误。谁能解释为什么?
/(?:\D+|<\d+>)*[!?]/
foobar foobar foobar
PREG_BACKTRACK_LIMIT_ERROR
灾难性的回溯。
嵌套不正确。