final Type textType1 = parameters.getType(0);
final Object textValue1 = parameters.getValue(0);
final Type patternType = parameters.getType(1);
final Object patternValue = parameters.getValue(1);
final String text = typeRegistry.convertToText(textType1, textValue1);
String regex = typeRegistry.convertToText(patternType, patternValue);
// replace any * or % with .*
regex = regex.replaceAll("\\*", ".*").replaceAll("%", ".*");