判断是否是数字(报错小数点,java)
java.util.regex.Pattern p = java.util.regex.Pattern.compile("^\\d+$|^\\d+\\.\\d+$");java.util.regex.Matcher m = p.matcher("123.1");if (m.matches()) {System.out.println("有效");} else {System