String code="11|1|1|02|1|05|09";
             //检查重复
         String code_t0 = code.replace("\\s",""); 
         if(Pattern.matches("(\\d{2}){1,10}",code_t0)){
          throw new RuntimeException("有重复");
         }else{
          System.out.println("验证通过!");
         }