public static Pattern compilePattern(String regex, Iterable<PathNormalization> normalizations) {
    int flags = 0;
    for (PathNormalization normalization : normalizations) {
      flags |= normalization.patternFlags();
    }
    return Pattern.compile(regex, flags);
  }
Compiles a regex pattern using flags based on the given normalizations.
jimfs/src/main/java/com/google/common/jimfs/PathNormalization.java