split word at capital letters js code example
Example 1: javascript separate words by capital letter
"thisIsATrickyOne".split(/(?=[A-Z])/);
Example 2: js split string on capital letter second
'ThisIsTheStringToSplit'.split(/(?=[A-Z])/); // positive lookahead to keep the capital letters