From:             andre dot thompson at sta dot uwi dot edu
Operating system: Windows 2003 Server Standard
PHP version:      5.2.5
PHP Bug Type:     *Regular Expressions
Bug description:  str_replace does not work for some regular expressions

Description:
------------
str_replace does not replace with more than one space.

Reproduce code:
---------------
$repstr = "', W";
$astring = "UPDATE Assets SET Supplier = '6', WHERE AssetID = '112'";
$update1 = str_replace($repstr, "'    W", $astring);
echo $update1;


Expected result:
----------------
UPDATE Assets SET Supplier = '6'    WHERE AssetID = '112'


Actual result:
--------------
UPDATE Assets SET Supplier = '6' WHERE AssetID = '112'


-- 
Edit bug report at http://bugs.php.net/?id=44538&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44538&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44538&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44538&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44538&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44538&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44538&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44538&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44538&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44538&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44538&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44538&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44538&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44538&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44538&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44538&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44538&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44538&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44538&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44538&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44538&r=mysqlcfg

Reply via email to