diff --git a/src/main/java/walkingkooka/spreadsheet/expression/function/SpreadsheetExpressionFunctionBooleanTextMatch.java b/src/main/java/walkingkooka/spreadsheet/expression/function/SpreadsheetExpressionFunctionBooleanTextMatch.java index d9f2aa5..76ed51a 100644 --- a/src/main/java/walkingkooka/spreadsheet/expression/function/SpreadsheetExpressionFunctionBooleanTextMatch.java +++ b/src/main/java/walkingkooka/spreadsheet/expression/function/SpreadsheetExpressionFunctionBooleanTextMatch.java @@ -18,9 +18,7 @@ package walkingkooka.spreadsheet.expression.function; -import walkingkooka.predicate.Predicates; import walkingkooka.spreadsheet.expression.SpreadsheetExpressionEvaluationContext; -import walkingkooka.text.CaseSensitivity; import walkingkooka.tree.expression.function.ExpressionFunctionParameter; import walkingkooka.tree.expression.function.ExpressionFunctionParameterKind; import walkingkooka.tree.expression.function.ExpressionFunctionParameterName; @@ -47,13 +45,11 @@ public Boolean apply(final List parameters, final SpreadsheetExpressionEvaluationContext context) { this.checkParameterCount(parameters); - final String pattern = PATTERN.getOrFail(parameters, 0); - final String text = VALUE.getOrFail(parameters, 1); - - return Predicates.globPatterns( - pattern, - CaseSensitivity.INSENSITIVE - ).test(text); + return TextMatch.parse( + PATTERN.getOrFail(parameters, 0) + ).test( + VALUE.getOrFail(parameters, 1) + ); } final static ExpressionFunctionParameter PATTERN = ExpressionFunctionParameterName.with("pattern")