Pattern pattern = Pattern.compile("[0-9]+(\\.?)[0]*");
Matcher matcher = pattern.matcher(noticeAMT);
int alength = noticeAMT.length();
// 含小数点后面不是0且不在末尾, 且不小于1,否则报错:金额不正确,最低为1元,且为整数
if(!matcher.matches() || ".".equals(noticeAMT.substring(alength-1,alength))
|| (new BigDecimal(noticeAMT).compareTo(new BigDecimal("1")))<0){
return false;
}else
return true;
Matcher matcher = pattern.matcher(noticeAMT);
int alength = noticeAMT.length();
// 含小数点后面不是0且不在末尾, 且不小于1,否则报错:金额不正确,最低为1元,且为整数
if(!matcher.matches() || ".".equals(noticeAMT.substring(alength-1,alength))
|| (new BigDecimal(noticeAMT).compareTo(new BigDecimal("1")))<0){
return false;
}else
return true;