Re: Separating words based on capital letter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux