October 23, 2017
PHP: 通过字母大小写分割字符,大写字符分割到数组, php explode at capital letters?

I have strings like,
$a = 'helloMister';
$b = 'doggyWaltz';
$c = 'bumWipe';
$d = 'pinkNips';
How can I explode at the capital letters, search on google for some time and came back with nothing!
Thanks.
解决:
If you want to split helloMister into hello and Mister you can use preg_split to split the string at a point just before the uppercase letter