private static boolean matches(Pattern pattern,String input){
  Matcher m=pattern.matcher(input);
  return m.matches();
}

private static boolean matches ( Pattern pattern , String input ) { Matcher m = pattern . matcher ( input ) ; return m . matches ( ) ; }
determines if the given input matches the given pattern .
