81,111
社区成员
发帖
与我相关
我的任务
分享
String str1 = "\"394155\",\"7080\",\"攀枝花市仁和区人大\",\"pan zhi hua shi ren he qu ren da\",\"People's Congress Of Ren He District,Pan Zhi Hua\",\"攀枝花市\",\"617061\",\"四川省攀枝花市攀枝花大道南段\",\"08122913356\",\"510400\",T,F,\"pan zhi hua shi|ren he qu|ren da\",\"\",\"\"";
String[] arr = (str1.split(",(?=(([^\"]*\"){2})+$)"));
System.out.println(arr.length);
for (String s:arr) {
System.out.println(s);
}
length:15
"394155"
"7080"
"攀枝花市仁和区人大"
"pan zhi hua shi ren he qu ren da"
"People's Congress Of Ren He District,Pan Zhi Hua"
"攀枝花市"
"617061"
"四川省攀枝花市攀枝花大道南段"
"08122913356"
"510400"
T
F
"pan zhi hua shi|ren he qu|ren da"
""
""