private static void validateRegex(String pattern) {
        try {
            Pattern.compile(pattern);
        } catch (PatternSyntaxException e) {
            throw new IllegalArgumentException("Invalid regex pattern: %s (%s)".formatted(pattern, e.getMessage()), e);
        }
    }
Represents a filter expression that matches a value from the evaluated expression against a regex.

@author bjorncs
container-search/src/main/java/com/yahoo/search/grouping/request/RegexPredicate.java