Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002943 [Quercus] minor always 09-16-08 16:37 09-17-08 11:46
Reporter koreth View Status public  
Assigned To
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.2.1 Product Version 3.2.1
  Product Build
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
Attached Files

- Relationships

- Notes
(0003451)
ferg
09-17-08 11:45

php/4e6b
 

- Issue History
Date Modified Username Field Change
09-16-08 16:37 koreth New Issue
09-17-08 11:45 ferg Note Added: 0003451
09-17-08 11:46 ferg Status new => closed
09-17-08 11:46 ferg Resolution open => fixed
09-17-08 11:46 ferg Fixed in Version  => 3.2.1


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker