note 103470 added to function.mb-split
| From: | boukeversteegh at gmail dot com | Date: | Thu, 14 Apr 2011 20:23:25 +0000 |
| Subject: | note 103470 added to function.mb-split | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178856@lists.php.net to get a copy of this message | ||
The $pattern argument doesn't use /pattern/ delimiters, unlike other regex functions such as
preg_match.
<?php
# Works. No slashes around the /pattern/
print_r( mb_split("\s", "hello world") );
Array (
[0] => hello
[1] => world
)
# Doesn't work:
print_r( mb_split("/\s/", "hello world") );
Array (
[0] => hello world
)
?>
----
Server IP: 83.137.20.135
Probable Submitter: 145.53.45.17
----
Manual Page -- http://www.php.net/manual/en/function.mb-split.php
Edit -- https://master.php.net/note/edit/103470
Del: integrated -- https://master.php.net/note/delete/103470/integrated
Del: useless -- https://master.php.net/note/delete/103470/useless
Del: bad code -- https://master.php.net/note/delete/103470/bad+code
Del: spam -- https://master.php.net/note/delete/103470/spam
Del: non-english -- https://master.php.net/note/delete/103470/non-english
Del: in docs -- https://master.php.net/note/delete/103470/in+docs
Del: other reasons-- https://master.php.net/note/delete/103470
Reject -- https://master.php.net/note/reject/103470
Search -- https://master.php.net/manage/user-notes.php