presto-plugin-toolkit/src/main/java/io/prestosql/plugin/base/security/CatalogAccessControlRule.java/CatalogAccessControlRule/match
class CatalogAccessControlRule:    public Optional<AccessMode> match(String user, String catalog)
    {
        if (userRegex.map(regex -> regex.matcher(user).matches()).orElse(true) &&
                catalogRegex.map(regex -> regex.matcher(catalog).matches()).orElse(true)) {
            return Optional.of(accessMode);
        }
        return Optional.empty();
    }