note 23546 added to function.split
| From: | paha at paha dot hu | Date: | Sun, 21 Jul 2002 22:51:45 +0000 |
| Subject: | note 23546 added to function.split | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33371@lists.php.net to get a copy of this message | ||
It's evident but not mentioned in the documentation that using asterisks is more restricted
than in a normal regular expression.
for exaple you cannot say:
split(";*",$string);
because what if there's no ";" separator?(which is covered by this regular
expression)
so you have to use at least
split(";+",$quotatxt);
in this situation.
--
http://www.php.net/manual/en/function.split.php
http://master.php.net/manage/user-notes.php?action=edit+23546
http://master.php.net/manage/user-notes.php?action=delete+23546
http://master.php.net/manage/user-notes.php?action=reject+23546