This sample data is returned by Web Service
200,6, "California, USA"
I want to split them using split(",")
and tried to see the result using simple code.
String loc = "200,6,\"California, USA\"";
String[] s = loc.split(",");
for(String f : s)
System.out.println(f);
Unfortunately this is the result
200
6
"California
USA"
The expected result should be
200
6
"California, USA"
I tried different regular expressions and no luck. Is it possible to escape the given regular expression inside of ""
?
UPDATE 1: Added C# Code
UPDATE 2: Removed C# Code