presto-iceberg/src/main/java/io/prestosql/plugin/iceberg/PartitionFields.java/PartitionFields/tryMatch
class PartitionFields:    private static boolean tryMatch(CharSequence value, Pattern pattern, Consumer<MatchResult> match)
    {
        Matcher matcher = pattern.matcher(value);
        if (matcher.matches()) {
            match.accept(matcher.toMatchResult());
            return true;
        }
        return false;
    }