public static boolean isPureDigital(String str) {
if (str == null || "".equals(str)){
return false;
}
String regEx1 = "^[1-9]\d*$";
Pattern p;
Matcher m;
p = Patternpile(regEx1);
m = p.matcher(string);
if (m.matches()){
return true;
}else{
return false;
}
}
更多推荐
java判断字符串是正整数
发布评论