ID: 31965 Updated by: [EMAIL PROTECTED] Reported By: mikael at SPAMMENOTchl dot chalmers dot se -Status: Open +Status: Verified Bug Type: PCRE related -Operating System: Linux +Operating System: * -PHP Version: 4.3.8 +PHP Version: 4CVS, 5CVS (2005-02-15)
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