how to split a string based on capital letter in javascript 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