I have several strings that contain one or more digits and may also contain one or more letters following the digits (caps on letters don't matter). The strings follow the following regex pattern:
[0-9]+[a-zA-z]*
and may look like:
"15791"
"14810A"
"10480ABCD"
"5ABCDEFGH"
If one of the strings above contains non-numerical characters, how do I split the numbers (first part) into an integer and the letters (second part) into a string?
I know I can split a string like this:
array = "1,2,3,4".split(',')
But this doesn't help since I don't have a separator.