Class ReplaceMatchesFunction