| Anonymous | Login | Signup for a new account | 11-03-2025 18:42 PST | 
| Main | My View | View Issues | Change Log | Docs | 
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0004974 | [Quercus] | minor | always | 03-02-12 09:17 | 01-05-13 23:22 | ||||
| Reporter | nemostein | View Status | public | ||||||
| Assigned To | nam | ||||||||
| Priority | normal | Resolution | fixed | ||||||
| Status | closed | Product Version | |||||||
| 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 "}"  | 
||||||||
| 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>  | 
||||||||
| Attached Files | |||||||||
| 
 | 
|||||||||
| 	Mantis 1.0.0rc3[^]
	Copyright © 2000 - 2005 Mantis Group
	29 total queries executed. 26 unique queries executed.  |