public default MatchResult partialmatch(String str){
  List<MatchResult> results=find(str,1);
  if (results.isEmpty()) {
    return new MatchResult(false);
  }
 else {
    return results.get(0);
  }
}

public default MatchResult partialmatch ( String str ) { List < MatchResult > results = find ( str , 1 ) ; if ( results . isEmpty ( ) ) { return new MatchResult ( false ) ; } else { return results . get ( 0 ) ; } }
checks whether the template can be found within the string . the matching result contains a boolean representing the outcome of the process , as well ( if the match is successful ) as the boundaries of the match and the extracted slot values .
