我正在寻找 Java 中的
replaceAll()
正则表达式选项以删除 "20.45"
周围的引号(带两位小数的数字)。字符串转换为 JSON。
输入:
String before = "{\"Claim\":\"111111\",\"Res\":\"word\",\"Resolution\":\"word\",\"Amount\":\"20.45\"}"
输出:
String afterReplaceAll = "\"Claim\":\"111111\",\"Res\":\"word\",\"Resolution\":\"word\",\"Amount\":20.45}"