Change type of our variable filter pattern from string to
java.util.regex.Pattern