matlab中聚类分析谱系图分析方法
发布网友
发布时间:2022-04-26 22:57
我来回答
共1个回答
热心网友
时间:2022-06-19 13:48
result = result.replaceAll(">\\s*<", "><").replaceAll("<\\?([^>|^\\?]*)\\?>", "");
String json = result;
Matcher matcher = Pattern.compile("<([^>|^/]*)>").matcher(result);
while(matcher.find()){
for (int i = 0; i < matcher.groupCount(); i++) {
String s = matcher.group(i+1);
json = json.replaceAll("<"+s+">([^<|^\"]*)</"+s+">", "\""+s+"\":\"$1\",");
}
}