//正则表达式数字验证
    public boolean isNumber(String str)
    {
        java.util.regex.Pattern pattern=java.util.regex.Pattern.compile("[0-9]*");
        java.util.regex.Matcher match=pattern.matcher(str);
        if(match.matches()==false)
        {
             return false;
        }
        else
        {
             return true;
        }
    }

 

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/zzys521/archive/2008/08/03/2761143.aspx

posted on 2010-12-20 13:19  暗夜螃蟹  阅读(407)  评论(0)    收藏  举报