List of usage examples for java.lang String matches
public boolean matches(String regex)
From source file:classes.InputCheck.java
public static Boolean checkNumbers_NotMandatory(String inputtxt) { return inputtxt.matches("^[0-9]{3}|([0-9]*\\.[0-9]+|[0-9]+)$") || !checkStringIsNotBlank(inputtxt); }
From source file:classes.InputCheck.java
public static Boolean checkPhone(String inputtxt) { return inputtxt.matches("^(0|\\+33)[1-9]([-. ]?[0-9]{2}){4}$") && checkStringIsNotBlank(inputtxt); }
From source file:classes.InputCheck.java
public static Boolean checkPhone_NotMandatory(String inputtxt) { return inputtxt.matches("^(0|\\+33)[1-9]([-. ]?[0-9]{2}){4}$") || !checkStringIsNotBlank(inputtxt); }
From source file:classes.InputCheck.java
public static Boolean checkAlphaChar(String inputtxt) { return inputtxt.matches("^[ A-Za-z]+$") && checkStringIsNotBlank(inputtxt); }
From source file:classes.InputCheck.java
public static Boolean checkAlphaChar_NotMandatory(String inputtxt) { return inputtxt.matches("^[ A-Za-z]+$") || !checkStringIsNotBlank(inputtxt); }
From source file:classes.InputCheck.java
public static Boolean checkDateSQL(String inputtxt) { return inputtxt.matches("^(19|20)\\d\\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$"); }
From source file:Main.java
public final static boolean isNumeric(String numberStr) { if (numberStr != null && !"".equals(numberStr.trim())) { return numberStr.matches("^[0-9]*$"); } else {//from w w w . ja v a 2 s. c o m return false; } }
From source file:classes.InputCheck.java
public static Boolean checkDateFormat(String inputtxt) { return inputtxt.matches("^(0[1-9]|[12][0-9]|3[01])[/](0[1-9]|1[012])[/](19|20)\\d\\d$") && checkStringIsNotBlank(inputtxt); }
From source file:classes.InputCheck.java
public static Boolean checkDateFormat_NotMandatory(String inputtxt) { return inputtxt.matches("^(0[1-9]|[12][0-9]|3[01])[/](0[1-9]|1[012])[/](19|20)\\d\\d$") || !checkStringIsNotBlank(inputtxt); }
From source file:classes.InputCheck.java
public static Boolean checkNumbers(String inputtxt) { return inputtxt.matches("^[0-9]{3}|([0-9]*\\.[0-9]+|[0-9]+)$") && checkStringIsNotBlank(inputtxt); }