java取得整数部分 代码时间:2023-03-09 13:16:28 Pattern p1 = Pattern.compile("[0-9]*"); Matcher m1 = p1.matcher("100.0"); boolean bool=m1.find(); if(bool){ System.out.println(m1.group()); }