When I perform
String test=\"23x34 \"; String[] array=test.split(\"x\"); //splitting using simple letter
I got two items in array as 23 and
split uses, as the documentation suggests, a regexp. a regexp for your example would be :
split
"[xX]"
Also, the (?i) flag toggles case insensitivty. Therefore, the following is also correct :
(?i)
"(?i)x"
In this case, x can be any litteral properly escaped.
x