Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
4974 | minor | always | 03-02-12 09:17 | 01-05-13 23:22 | |
|
|||||
Reporter: | nemostein | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | |||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 4.0.34 | ||
|
|||||
Summary: | 0004974: Regex PCRE recursion (balancing groups) isn't working as expected in Quercus | ||||
Description: |
When using a regex with recursive matching "(?R)" the result isn't what is expected. ______________________________ How to reproduce: Run the following snippet $subject = "{a{b{c}d}e}"; preg_match_all(" / {( (?: [^{}] | (?R) )* )} /ixsm", $subject, $matches); print_r($matches); ______________________________ What was expected: Array ( [0] => Array ( [0] => {a{b{c}d}e} // The whole match ) [1] => Array ( [0] => a{b{c}d}e // The 1st group ) ) ______________________________ What is the result: Array ( [0] => Array ( [0] => {a{b{c}d}e} // The whole match is OK! ) [1] => Array ( [0] => c}d}e // The 1st group isn't. ) ) ______________________________ The main problem is that the balance died at firs occurrence of "}" |
||||
Steps To Reproduce: | |||||
Additional Information: |
I'm using the Quercus bundle in the maven repository at: http://caucho.com/m2/com/caucho/resin/4.0.23/ [^] <dependency> <groupId>com.caucho</groupId> <artifactId>resin</artifactId> <version>4.0.23</version> </dependency> |
||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|