i'm trying to split a String which contains an Uppercase Part + a Lowercase Part in Javascript (ES5). The String always looks like "UPPERlower".
Here's what i currently use
"ABCabc".match(/^[A-Z]+/g).concat("ABCabc".match(/[a-z]+$/g)) //result is ["ABC", "abc"]
Is there a cleaner code to achieve this?
EDIT: Ori Drori's answer and mplungjan's answer are both correct for my Problem.