问题:
How would I go about splitting the word:我将如何拆分这个词:
oneTwoThreeFour
into an array so that I can get:放入一个数组中,以便我可以得到:
one Two Three Four
with preg_match
?与preg_match
?
I tired this but it just gives the whole word我累了,但它只是给出了整个词
$words = preg_match("/[a-zA-Z]*(?:[a-z][a-zA-Z]*[A-Z]|[A-Z][a-zA-Z]*[a-z])[a-zA-Z]*\b/", $string, $matches)`;
解决方案:
参考:
https://stackoom.com/en/question/Ixn1
来源:https://my.oschina.net/stackoom/blog/5403532