How do we retrieve values between multiple delimiters ?
Consider we have a message as below
"1000000228" " " "0 " "9900 "
and we have to parse through this string to pick data between the two delimiters. Here in our case it's double codes
So the snippet goes as below
We have declared the string into the variable "msg"
String msg=",\"1000000228\" \" \" \"0 \" \"9900 \"";
String[] elements = msg.split("\"");
for (String element : elements) {
System.out.println(element);
}
And your output looks as below >>
1000000228
0
9900