From: Operating system: Windows XP SP3 PHP version: 5.2.13 Package: PCRE related Bug Type: Bug Bug description:preg_replace returns NULL, if in line more than 991 blanks
Description:
------------
One of my regular expressions leads to return of emptiness to functions
preg_replace if the initial line contains more than 991 blanks. Example
more low. The first line works, the second dies also I lose all contents.
Test script:
---------------
$text = 'test'.str_repeat(' ', 991).'test'; // work
$text = 'test'.str_repeat(' ', 992).'test'; // empty :(
if ($text = preg_replace('/(.*?\s+)"([^\s]+.*?)/', '$1<quot1>$2', $text))
{
echo "GOOD\n";
} else {
echo "BAD\n";
}
--
Edit bug report at http://bugs.php.net/bug.php?id=51963&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51963&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51963&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=51963&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=51963&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=51963&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51963&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=51963&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=51963&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=51963&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=51963&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=51963&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=51963&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=51963&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51963&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51963&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51963&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=51963&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=51963&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=51963&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=51963&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=51963&r=mysqlcfg
