When I perform
String test=\"23x34 \"; String[] array=test.split(\"x\"); //splitting using simple letter
I got two items in array as 23 and
Use regex pattern [xX] in split
[xX]
split
String x = "24X45"; String[] res = x.split("[xX]"); System.out.println(Arrays.toString(res));