List of usage examples for java.util.regex Matcher matches
public boolean matches()
From source file:Main.java
public static boolean checkPhone(String phone) { Pattern p = Pattern.compile( "^(((13[0-9])|(14[5,7])|(17[0|5-8])|(15([0-3]|[5-9]))|(18([0-9])))\\d{8})|(0\\d{2}-\\d{8})|(0\\d{3}-\\d{7})$"); Matcher m = p.matcher(phone); return m.matches(); }
From source file:Main.java
public static boolean isMobileNumber(String mobiles) { Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$"); Matcher m = p.matcher(mobiles); return m.matches(); }
From source file:Main.java
public static boolean isMobileNO(String params) { String str = "^((13[0-9])|(15[^4,\\D])|(17[^4,\\D])|(18[0-9]))\\d{8}$"; Pattern p = Pattern.compile(str); Matcher m = p.matcher(params); return m.matches(); }
From source file:Main.java
public static boolean isMobile(String mobiles) { Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,0-9]))\\d{8}$"); Matcher m = p.matcher(mobiles); return m.matches(); }
From source file:Main.java
public static boolean isValid_mail(String email) { String str = "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"; Pattern p = Pattern.compile(str); Matcher m = p.matcher(email); return m.matches(); }
From source file:Main.java
public static boolean isEmail(String email) { String str = "^([a-zA-Z0-9]*[-_.]?[a-zA-Z0-9]+)*@([a-zA-Z0-9]*[-_]?[a-zA-Z0-9]+)+[\\.][A-Za-z]{2,3}([\\.][A-Za-z]{2})?$"; Pattern p = Pattern.compile(str); Matcher m = p.matcher(email); return m.matches(); }
From source file:Main.java
public static boolean checkEmail(String email) { String regExp = "^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,4})+$"; Pattern p = Pattern.compile(regExp); Matcher m = p.matcher(email); return m.matches(); }
From source file:Main.java
public static boolean isMobileNO(String mobiles) { Pattern p = Pattern.compile("^((13[0-9])|(15[^4,//D])|(18[0,5-9]))//d{8}$"); Matcher m = p.matcher(mobiles); return m.matches(); }
From source file:Main.java
public static boolean isMobileNO(String mobiles) { Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(17[6-8])|(18[0-9]))\\d{8}$"); Matcher m = p.matcher(mobiles); return m.matches(); }
From source file:Main.java
public static boolean isMatches(String text) { String strPattern = "^[_a-zA-Z0-9]+$"; Pattern p = Pattern.compile(strPattern); Matcher m = p.matcher(text); return m.matches(); }