public static List<Predicate<String>> compilePatternsToPredicates(List<String> patterns) {
    return patterns.stream().map(pattern -> compile(pattern).asPredicate()).collect(Collectors.toList());
  }
Compile a list of regex patterns and collect them as Predicates.
@param patterns List of regex patterns to be compiled
@return a List of Predicate created by compiling the regex patterns
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreUtils.java