note 80486 added to function.str-split
| From: | RichardAyotte at osu1 dot php dot net | Date: | Fri, 18 Jan 2008 14:27:19 +0000 |
| Subject: | note 80486 added to function.str-split | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-135195@lists.php.net to get a copy of this message | ||
Slight mod to the CamelCaseFormat regex that behaves better with strings with multiple upper case
letters immediately following each other.
CustomerID -> Customer ID and not Customer I D
<?php
$test = 'CustomerIDWithSomeOtherJETWords';
preg_replace('/(?!^)[[:upper:]][[:lower:]]/', ' $0',
preg_replace('/(?!^)[[:upper:]]+/', ' $0', $test));
?>
Customer ID With Some Other JET Words
----
Server IP: 66.207.199.35
Probable Submitter: 216.129.28.51
----
Manual Page -- http://www.php.net/manual/en/function.str-split.php
Edit -- https://master.php.net/note/edit/80486
Del: integrated -- https://master.php.net/note/delete/80486/integrated
Del: useless -- https://master.php.net/note/delete/80486/useless
Del: bad code -- https://master.php.net/note/delete/80486/bad+code
Del: spam -- https://master.php.net/note/delete/80486/spam
Del: non-english -- https://master.php.net/note/delete/80486/non-english
Del: in docs -- https://master.php.net/note/delete/80486/in+docs
Del: other reasons-- https://master.php.net/note/delete/80486
Reject -- https://master.php.net/note/reject/80486
Search -- https://master.php.net/manage/user-notes.php