@Test public void testIsMatchRegex() { }
public static boolean isMatchRegex(String input, String regex) { boolean isValid=false; CharSequence inputStr = input; Pattern pattern = Pattern.compile(regex,Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); if(matcher.matches()){ isValid = true; } return isValid; }
ValidatorUtil { public static boolean isMatchRegex(String input, String regex) { boolean isValid=false; CharSequence inputStr = input; Pattern pattern = Pattern.compile(regex,Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); if(matcher.matches()){ isValid = true; } return isValid; } }
ValidatorUtil { public static boolean isMatchRegex(String input, String regex) { boolean isValid=false; CharSequence inputStr = input; Pattern pattern = Pattern.compile(regex,Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); if(matcher.matches()){ isValid = true; } return isValid; } private  ValidatorUtil(); }
ValidatorUtil { public static boolean isMatchRegex(String input, String regex) { boolean isValid=false; CharSequence inputStr = input; Pattern pattern = Pattern.compile(regex,Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); if(matcher.matches()){ isValid = true; } return isValid; } private  ValidatorUtil(); static boolean isEmail(String email); static boolean isPhoneNumber(String phoneNumber); static boolean isMatchRegex(String input, String regex); static boolean isNumeric(String number); static boolean isValidDateRange(Date dateField1, Date dateField2, String dateFormat); }
ValidatorUtil { public static boolean isMatchRegex(String input, String regex) { boolean isValid=false; CharSequence inputStr = input; Pattern pattern = Pattern.compile(regex,Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(inputStr); if(matcher.matches()){ isValid = true; } return isValid; } private  ValidatorUtil(); static boolean isEmail(String email); static boolean isPhoneNumber(String phoneNumber); static boolean isMatchRegex(String input, String regex); static boolean isNumeric(String number); static boolean isValidDateRange(Date dateField1, Date dateField2, String dateFormat);  }