@Override public MatchResult match(String str){
  String input=str.trim();
  Matcher matcher=pattern.matcher(input);
  if ((matcher.matches())) {
    MatchResult result=new MatchResult(matcher.start(),matcher.end());
    for (    String slot : slots.keySet()) {
      String filledValue=matcher.group(slots.get(slot));
      if (!StringUtils.checkForm(filledValue) && permutatePattern()) {
        return match(str);
      }
      result.addPair(slot,filledValue);
    }
    return result;
  }
  return new MatchResult(false);
}

@ Override public MatchResult match ( String str ) { String input = str . trim ( ) ; Matcher matcher = pattern . matcher ( input ) ; if ( ( matcher . matches ( ) ) ) { MatchResult result = new MatchResult ( matcher . start ( ) , matcher . end ( ) ) ; for ( String slot : slots . keySet ( ) ) { String filledValue = matcher . group ( slots . get ( slot ) ) ; if ( ! StringUtils . checkForm ( filledValue ) && permutatePattern ( ) ) { return match ( str ) ; } result . addPair ( slot , filledValue ) ; } return result ; } return new MatchResult ( false ) ; }
tries to match the template against the provided string .
