I have a regular expression in JavaScript to split my camel case string at the upper-case letters using the following code (which I subsequently got from here):
If you want an array of lower case words:
"myCamelCaseString".split(/(?=[A-Z])/).map(s => s.toLowerCase());
If you want a string of lower case words:
"myCamelCaseString".split(/(?=[A-Z])/).map(s => s.toLowerCase()).join(' ');
If you want to separate the words but keep the casing:
"myCamelCaseString".replace(/([a-z])([A-Z])/g, '$1 $2')