note 101109 added to function.preg-split

From: Date: Fri, 26 Nov 2010 12:38:16 +0000
Subject: note 101109 added to function.preg-split
Groups: php.notes 
Request: Send a blank email to php-notes+get-174380@lists.php.net to get a copy of this message
You must be caution when using lookbehind to a variable match. For example: '/(?<!\\\)\r?\n)/' to match a new line when not \ is before it don't go as spected as it match \r as the lookbehind (becouse isn't a \) and is optional before \n. You must use this for example: '/((?<!\\\|\r)\n)|((?<!\\\)\r\n)/' That match a alone \n (not preceded by \r or \) or a \r\n not preceded by a \. ---- Server IP: 69.147.83.197 Probable Submitter: 80.33.99.95 ---- Manual Page -- http://www.php.net/manual/en/function.preg-split.php Edit -- https://master.php.net/note/edit/101109 Del: integrated -- https://master.php.net/note/delete/101109/integrated Del: useless -- https://master.php.net/note/delete/101109/useless Del: bad code -- https://master.php.net/note/delete/101109/bad+code Del: spam -- https://master.php.net/note/delete/101109/spam Del: non-english -- https://master.php.net/note/delete/101109/non-english Del: in docs -- https://master.php.net/note/delete/101109/in+docs Del: other reasons-- https://master.php.net/note/delete/101109 Reject -- https://master.php.net/note/reject/101109 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#174380) next »