note 49798 added to function.split
| From: | hal dot 9x1000 at gmail dot com | Date: | Tue, 08 Feb 2005 22:41:00 +0000 |
| Subject: | note 49798 added to function.split | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-84694@lists.php.net to get a copy of this message | ||
si necesitas separar una cadena con el caracter '-' y otros al mismo tiempo tienes que
poner el caracter '-' al principio de la expresion regular para que lo tome como caracter
y no como rango
asi:
$arr=split('[-.a-z]',$cad);
esto separa una cadena como esta: 1.2.a3-3.10
en esto:
$arr={ '1' , '2' , '3' , '3' , '10' };
----
Manual Page -- http://www.php.net/manual/en/function.split.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+49798
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49798&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49798&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49798&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49798&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49798&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+49798&report=yes
Search -- http://master.php.net/manage/user-notes.php