我想拆分该字符串,我发现它是如此复杂。
"GPSTime":"7/10/2014 5:44:23 AM"
进入
7/10/2014 5:44:23 AM
有什么帮助吗?
最佳答案
给你:
首先,用 ":"
分割,然后替换日期时间字符串中的最后一个 "
。
String c= "\"GPSTime\":\"7/10/2014 5:44:23 AM\"";
String x= c.split("\":\"")[1];
System.out.println("final: "+x.replace("\"", ""));
输出:
08-07 14:54:21.931: I/System.out(20228): final: 7/10/2014 5:44:23 AM
关于Java如何用多个双引号分割字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25178648/