|
Mantis - Quercus
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 2943 | minor | always | 09-16-08 16:37 | 09-17-08 11:46 | |
|
|
|||||
| Reporter: | koreth | Platform: | |||
| Assigned To: | OS: | ||||
| Priority: | normal | OS Version: | |||
| Status: | closed | Product Version: | 3.2.1 | ||
| Product Build: | Resolution: | fixed | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | 3.2.1 | ||
|
|
|||||
| Summary: | 0002943: preg_replace doesn't deal properly with empty subexpression | ||||
| Description: |
<?php $foo = "12345xy6789"; print preg_replace('/^(|[^x]*x)y.*/', '\1', $foo); Vanilla PHP prints "12345x". Quercus prints "12345xy6789" -- the empty alternative at the beginning of the subexpression confuses it. If you remove the "|" this test works (but that obviously changes the meaning of the regular expression.) |
||||
| Steps To Reproduce: | |||||
| Additional Information: | |||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||