#44543 [Opn->Bgs]: preg_split: patterns with assertions
| From: | felipe@php.net | Date: | Wed, 26 Mar 2008 22:44:29 +0000 |
| Subject: | #44543 [Opn->Bgs]: preg_split: patterns with assertions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-123688@lists.php.net to get a copy of this message | ||
ID: 44543
Updated by: felipe@php.net
Reported By: unkind at regex dot su
-Status: Open
+Status: Bogus
Bug Type: PCRE related
Operating System: Windows XP
PHP Version: 5.2.5
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
The your regexp no make senses, and a regexp doesn't will remove the
escape on matching.
http://www.pcre.org/man.txt
Previous Comments:
------------------------------------------------------------------------
[2008-03-26 22:33:17] unkind at regex dot su
Description:
------------
I want to split string like this: "cell:cell:cell with '\:':cell" by
pattern "/(?!\\):/"
Reproduce code:
---------------
<?php
$s = "cell:cell:cell with '\\:':cell";
$s = preg_split('/(?!\\\\):/', $s);
print_r( $s );
?>
Expected result:
----------------
Array
(
[0] => cell
[1] => cell
[2] => cell with ':'
[3] => cell
)
Actual result:
--------------
Array
(
[0] => cell
[1] => cell
[2] => cell with '\
[3] => '
[4] => cell
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44543&edit=1