非负数正则表达式
public static Boolean isNotNegative(String str) {
String pattern = "^\\d+(\\.{0,1}\\d+){0,1}$";
Pattern r = Pattern.compile(pattern);
boolean matches = r.matcher(str).matches();
return matches;
}
非负数正则表达式
public static Boolean isNotNegative(String str) {
String pattern = "^\\d+(\\.{0,1}\\d+){0,1}$";
Pattern r = Pattern.compile(pattern);
boolean matches = r.matcher(str).matches();
return matches;
}