public static boolean isNumericOrDecimal(String str) {
if (str == null) {
return false;
}
// 正则表达式匹配整数或小数
return str.matches("-?\\d+(\\.\\d+)?");
}
08-25
492

10-31
2万+
