Bug #15413 Updated: preg_split drops characters

From: Date: Thu, 07 Feb 2002 11:41:35 +0000
Subject: Bug #15413 Updated: preg_split drops characters
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-79512@lists.php.net to get a copy of this message
ID: 15413 Updated by: sander@php.net Reported By: caribu@snafu.de -Status: Open +Status: Bogus Bug Type: PCRE related Operating System: win PHP Version: 4.0.6 New Comment: Very likely to be a error in your regex. Ask support questions on the appropriate mailinglist. Previous Comments: ------------------------------------------------------------------------ [2002-02-06 19:27:52] caribu@snafu.de $html = {some html containing mulitple instances of "<!-- [some text] --> some text <-- end -->} $array = preg_split("'(?=<!--)(?!<!-- end -->)|(?<=\<!-- ende -->)'si", $html, -1, PREG_SPLIT_NO_EMPTY) preg_split should split the string in such a way, that the html-part and the commented part are each assigned to one array entry. preg_split does as expected, EXCEPT that the first character of the last array entry is disappears Server API Apache Win2000 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15413&edit=1

« previous php.dev (#79512) next »