Re: PHP 4.0 Bug #9029: preg_split inconsistency

From: Date: Wed, 31 Jan 2001 15:11:48 +0000
Subject: Re: PHP 4.0 Bug #9029: preg_split inconsistency
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-45458@lists.php.net to get a copy of this message
On Wed, 31 Jan 2001, anil@recoil.org wrote: > The brackets aren't captured, which makes the Scheme parsing a bit difficult :-) There > are other ways to do this, of course, but the preg_split() would be the simplest and the most > efficient way to do it, as far as we can see. > > I noticed that the PCRE libraries are only at version 3.0 in PHP, and that 3.4 is available > from the main site. I'll try updating to that, and see if it solves this. I could add this functionality but I am not sure if it would break people's scripts because they used parentheses without expecting to receive captured delimiters. What does everyone think? Should it be that way by default or should we have another PREG_SPLIT flag, e.g. PREG_SPLIT_DELIM_CAPTURE? And if we have a flag can it be combined with PREG_SPLIT_NO_EMPTY? -Andrei * "Lack of planning on your part doesn't consitute an emergency on my part." *

« previous php.dev (#45458) next »