I have a string value that looks like this:
TE\;R20\;T11\;19
I would like to be divided into TE
, R20
, T11
and 19
. I am trying to apply a method to it split
, but unfortunately it still cannot correctly split the string
Here is my source code
String description1 = CSVdata2[7];
System.out.println("The description1 is :"+description1);
String email1 = CSVdata2[2];
String [] data1 = description1.split(";");
String ID1 = data1[0];
String [] data2 = SysID1.split("/");
String ID2 = data2[0];
System.out.println("The ID2 is :"+ID2);
Here is my output file
The description1 is :TE\;R20\;T11\;19
The ID2 is :TE\
I tried to find some kind of approach on the Internet, but I still cannot make it split into the string I want
source
share