I am trying to split String in Java. Separations must occur between two characters, one of which is alphabetic (az, AZ) and the other number (0-9). For instance:
String s = "abc123def456ghi789jkl";
String[] parts = s.split(regex);
System.out.println(Arrays.deepToString(parts));
The conclusion should be [abc, 123, def, 456, ghi, 789, jkl]. Can someone help me with the appropriate regex?
Thanks in advance!
source
share