ID:               31965
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mikael at SPAMMENOTchl dot chalmers dot se
-Status:           Verified
+Status:           Feedback
 Bug Type:         PCRE related
 Operating System: *
 PHP Version:      5CVS, 4CVS (2005-05-30)
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

PCRE was upgraded to version 5.0.


Previous Comments:
------------------------------------------------------------------------

[2005-02-14 10:27:15] mikael at SPAMMENOTchl dot chalmers dot se

Description:
------------
In some cases the preg_split strips non-empty pieces when the
PREG_SPLIT_NO_EMPTY flag i set. Specifically when using assertions only
to split on, eg. the string to split on itself is actually empty (but
not the pieces)

Reproduce code:
---------------
$terms = preg_split('/(?<=\d)(?=[a-zåäö])/', 'ser1ia456l', 0,
PREG_SPLIT_NO_EMPTY);
print_r($terms);


Expected result:
----------------
Array
(
    [0] => ser1
    [1] => ia456
    [2] => l
)

Actual result:
--------------
Array
(
    [0] => ser1
    [1] => ia456
)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31965&edit=1

Reply via email to