Re: Separating words based on capital letter
| From: | Myron Turner | Date: | Wed, 25 Apr 2007 01:15:23 +0000 |
| Subject: | Re: Separating words based on capital letter | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-253637@lists.php.net to get a copy of this message | ||
Richard Lynch wrote:
Why rule out PCRE, which is probably the best weapon for the job? $string = ltrim(preg_replace('([A-Z])', ' \\1', $string)); Don't mean to be pedantic, but you left out the '/. . ./':$string = $string = ltrim(preg_replace('/([A-D])/', " \\1", $string)); _____________________ Myron Turner http://www.room535.org http://www.bstatzero.org http://www.mturner.org/XML_PullParser/