javascript separate words by capital letter

52

js split string on capital letter second -

'ThisIsTheStringToSplit'.split(/(?=[A-Z])/); // positive lookahead to keep the capital letters

javascript separate words by capital letter -

"thisIsATrickyOne".split(/(?=[A-Z])/);

Comments

Submit
0 Comments