|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-26 22:44 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 20:00:01 2025 UTC |
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 )