Would anyone be able to assist me with some regex. I want to split the following string into alphabet and number.
Example String ns01sp0001 after split it
ns01sp0001
You can use:
String tok[] = str.split("(?<=\\D)(?=\\d+\\b)");
RegEx Demo