标签:arc 集成 cancel 管理 width line isa checked copyright
<span style="white-space:pre"> </span>String a="123.23";
Pattern pattern = Pattern.compile("^(([1-9]{1}\\d*)|([0]{1}))(\\.(\\d){0,2})?$");
Matcher isNum = pattern.matcher(a);
if( !isNum.matches() ){
System.out.println("不是数字");
}
else
{
System.out.println("是数字");
}
0条评论