String type = "数字类型";
if(StringUtils.isNotBlank(value)){
//区分正负数 if(value.startsWith("-")){ value = value.substring(1); } String reg = "^[0-9]+(.[0-9]+)?$"; if(!value.matches(reg)){ search = "字符类型"; } }else{ search = "字符类型"; }
String type = "数字类型";
if(StringUtils.isNotBlank(value)){
//区分正负数 if(value.startsWith("-")){ value = value.substring(1); } String reg = "^[0-9]+(.[0-9]+)?$"; if(!value.matches(reg)){ search = "字符类型"; } }else{ search = "字符类型"; }
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。