Java判断字符串是否包含数字

 public static boolean isContainNumber(String company) {

            Pattern p = Pattern.compile("[0-9]");
            Matcher m = p.matcher(company);
            if (m.find()) {
                return true;
            }
            return false;
        }

 

posted on 2016-08-29 14:29  山高似水深  阅读(9914)  评论(0编辑  收藏  举报

购买方式 点击下面图标购买