Bug #15361 Updated: preg_split PREG_SPLIT_DELIM_CAPTURE does not work like in 4.0.6
| From: | tlb at nonamecrew dot com | Date: | Mon, 04 Feb 2002 14:44:31 +0000 |
| Subject: | Bug #15361 Updated: preg_split PREG_SPLIT_DELIM_CAPTURE does not work like in 4.0.6 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-79095@lists.php.net to get a copy of this message | ||
ID: 15361
Updated by: tlb@nonamecrew.com
Reported By: tlb@nonamecrew.com
-Status: Open
+Status: Closed
Bug Type: PCRE related
Operating System: NetBSD 1.5.2
PHP Version: 4.1.1
New Comment:
sorry, simple reason
my host does NOT linked - php-pcre-4.1.1 PHP4 extension for
Perl-compatible regular expressions - into his build
and error-reporting was off, - error_reporting (E_ALL ); - inside a
script doesn´t changes anything, so I got no error-report like he in
his - /var/log/httpd/error_log -
cu
tlb
Previous Comments:
------------------------------------------------------------------------
[2002-02-03 18:09:07] tlb@nonamecrew.com
hello
for my small logic parser and sql-query-generator I used preg_split
with PREG_SPLIT_DELIM_CAPTURE flag like shown below, but now with 4.1.1
my result $elements is empty an the rest of my function work with a
empty array and nothing happen.
// my input is like
$inString = array('tlb | test');
// use of preg_split
$elements = preg_split
("/\s+|(\()|(\))|(\\\\\")|(\+)|(,)|(&)|(!)|(\|)/", $inString, -1,
PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE);
// output, result was in 4.0.6 like ...
$elements[0] ='tlb'
$elements[1] ='|'
$elements[2] ='test'
cu
tlb
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15361&edit=1