note 89730 added to function.preg-split

From: Date: Fri, 20 Mar 2009 17:58:46 +0000
Subject: note 89730 added to function.preg-split
Groups: php.notes 
Request: Send a blank email to php-notes+get-152216@lists.php.net to get a copy of this message
I response to the post of "csaba at alum dot mit dot edu" You can make 2 times faster the same thing with this script: // encapsulating of all asterix not escaped $string=strtr($string,array('\\*'=>'\\*','*'=>'[*]')); // exploding on all asterix not escaped (now encapsulated by [] ) $aPieces = explode('[*]',$string); // unescaping can be safely done on each piece $aPieces=str_replace('\\','',$aPieces); ---- Server IP: 216.235.13.26 Probable Submitter: 64.235.196.34 ---- Manual Page -- http://www.php.net/manual/en/function.preg-split.php Edit -- https://master.php.net/note/edit/89730 Del: integrated -- https://master.php.net/note/delete/89730/integrated Del: useless -- https://master.php.net/note/delete/89730/useless Del: bad code -- https://master.php.net/note/delete/89730/bad+code Del: spam -- https://master.php.net/note/delete/89730/spam Del: non-english -- https://master.php.net/note/delete/89730/non-english Del: in docs -- https://master.php.net/note/delete/89730/in+docs Del: other reasons-- https://master.php.net/note/delete/89730 Reject -- https://master.php.net/note/reject/89730 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152216) next »