Home » Database » DB_DataObject » Bug #20
regexp bug in Generator.php
Details
| Submitted | 2003-09-18 12:30 UTC |
|---|---|
| From | sergey at nikiforov dot net |
| Assigned | alan_k |
| Status | Closed |
| Package | DB_DataObject |
| PHP Version | 4.3.1 |
| OS | Win2K |
| Roadmaps | (Not assigned) |
Comments
[2003-09-18 12:30 UTC] sergey at nikiforov dot net
Description:
------------
in Generator.php lines 459-461 you wrote this code:
return preg_replace(
'/(\n|\r\n)\s*###START_AUTOCODE\n.*\n\s*###END_AUTOCODE(\n|\r\n)/s',
$body,$input);
it doesn't work under win platform becouse of missing \r in regexp.
The following will work:
return preg_replace(
'/(\n|\r\n)\s*###START_AUTOCODE(\n|\r\n).*(\n|\r\n)\s*###END_AUTOCODE(\n|\r\n)/s',
$body,$input);
Reproduce code:
---------------
return preg_replace(
'/(\n|\r\n)\s*###START_AUTOCODE\n.*\n\s*###END_AUTOCODE(\n|\r\n)/s',
$body,$input);