我有例如字符串:"iCanSeeBluePeople"
,我需要它由大寫字母並與小寫開始,所以我會收到陣列像["i","Can","See","Blue","People"]
PHP的獨立字符串
琴絃可以像"grandPrix2009"
=>["grand","Prix","2009"]
,"dog"
=>["dog"]
,"aDog"
=>["a","Dog"]
等
我發現這個代碼WH ICH工作正常,但我並不適用於數字而忽略拳頭小寫字母:
<?
$str="MustangBlueHeadlining";
preg_match_all('/[A-Z][^A-Z]*/',$str,$results);
?>
感謝您的幫助
不知道這可以用一個正則表達式來完成。你很可能不得不走路。 – dqhendricks 2012-03-25 01:01:11