正则表达式关于indexOf找出是否含有数字,求解~
if(inputStr.indexOf("\\d+")<0)
public static boolean isHasDigital(String checkStr) {
Pattern pattern = Pattern.compile("\\d+");
Matcher matcher = pattern.matcher(checkStr);
boolean match = matcher.find();
if (match) {
return true;
}
return false;
}