如题...注意是15位的身份证..先谢过!!

解决方案 »

  1.   

    http://epasser.aydc.com.cn/article/adp/2/content14477.html 里面有详细的说明
      

  2.   

    public static boolean isDigitStr(String str){
         Pattern pattern = Pattern.compile("[0-9]+"); 
         Matcher matcher = pattern.matcher((CharSequence)str); 
         return matcher.matches(); }
      

  3.   


    public static boolean isIdCardStr(String str) {
    Pattern pattern = Pattern.compile("\\d{15}");
    Matcher matcher = pattern.matcher((CharSequence) str);
    return matcher.matches();
    }

      

  4.   

    按身份证的编码规则进行校验
    具体规则google一下