/**
*
* 功能描述: 判断金额是否为数字(且是2位有效数字)
*/
public static boolean isNumber(String str) {
String regex = "^([0-9]+(.[0-9]{1,2})?)|(-[0-9]+(.[0-9]{1,2})?)$";
Pattern pattern = Pattern.compile(regex);
Matcher match = pattern.matcher(str);
return match.matches();
}