public static RePattern compile(String pattern, PatternFlags... flags) throws RegexException {
        EnumSet<PatternFlags> flagSet = EnumSet.noneOf(PatternFlags.class);
        Collections.addAll(flagSet, flags);
        return Compiler.compile(pattern, flagSet);
    }
public static RePattern compile ( String pattern , PatternFlags ... flags ) throws RegexException { EnumSet < PatternFlags > flagSet = EnumSet . noneOf ( PatternFlags . class ) ; Collections . addAll ( flagSet , flags ) ; return Compiler . compile ( pattern , flagSet ) ; }
Compile a pattern.
@param pattern the pattern.
@param flags flags that determine the interpretation of the pattern.
@return the compiled pattern.
@throws RegexException