fork download
  1. import java.util.regex.Pattern;
  2.  
  3. class Test {
  4.  
  5. public static void main (String[] args) throws java.lang.Exception {
  6.  
  7. Pattern p = Pattern.compile("(?=^[0-9 ]{10,16}$)(?=^([0-9]* ){0,3}[0-9]*$)^.*$");
  8. System.out.println(p.matcher("1234 890").matches());
  9.  
  10. }
  11.  
  12. }
Success #stdin #stdout 0.08s 380160KB
stdin
Standard input is empty
stdout
false