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):
My guess is replacing /([A-Z])/ with /([a-z])([A-Z])/ and ' $1' with '$1 $2'
/([A-Z])/
/([a-z])([A-Z])/
' $1'
'$1 $2'
"MyCamelCaseString" .replace(/([a-z])([A-Z])/g, '$1 $2');
/([a-z0-9])([A-Z])/ for numbers counting as lowercase characters
/([a-z0-9])([A-Z])/
console.log("MyCamelCaseStringID".replace(/([a-z0-9])([A-Z])/g, '$1 $2'))