Re: Separating words based on capital letter
| From: | Arpad Ray | Date: | Tue, 24 Apr 2007 22:03:00 +0000 |
| Subject: | Re: Separating words based on capital letter | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-253629@lists.php.net to get a copy of this message | ||
Roman Neuhauser wrote:
implode(' ', preg_split('~(?=[[:upper:]])~', 'FooBarBaz', -1, PREG_SPLIT_NO_EMPTY)); Or just.. preg_replace('/\B[A-Z]/', ' $0', 'FooBarBaz')Arpad