用Java 将 高温23℃ 的23截取出来
代码如下:
String str = "高温23℃";
String temperature = str.replaceAll("[^0-9]","");
System.out.println("温度为:" + temperature);
输出结果为:温度为:23
原文地址: https://www.cveoy.top/t/topic/bby0 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
代码如下:
String str = "高温23℃";
String temperature = str.replaceAll("[^0-9]","");
System.out.println("温度为:" + temperature);
输出结果为:温度为:23
原文地址: https://www.cveoy.top/t/topic/bby0 著作权归作者所有。请勿转载和采集!