|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15361 preg_split PREG_SPLIT_DELIM_CAPTURE does not work like in 4.0.6
Submitted: 2002-02-03 18:09 UTC Modified: 2002-02-04 09:44 UTC
From: tlb at nonamecrew dot com Assigned:
Status: Closed Package: PCRE related
PHP Version: 4.1.1 OS: NetBSD 1.5.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
49 - 18 = ?
Subscribe to this entry?

 [2002-02-03 18:09 UTC] tlb at nonamecrew dot com
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'



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-04 09:44 UTC] tlb at nonamecrew dot com
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 -


PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Oct 27 03:03:34 2021 UTC