非负数正则表达式
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;
}
5051
270

被折叠的 条评论
为什么被折叠?