Package com.google.common.base
Interface PatternCompiler
-
- All Known Implementing Classes:
Platform.JdkPatternCompiler
interface PatternCompilerPluggable interface for compiling a regex pattern. By default this package uses thejava.util.regexlibrary, but an alternate implementation can be supplied using theServiceLoadermechanism.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommonPatterncompile(java.lang.String pattern)Compiles the given pattern.booleanisPcreLike()Returnstrueif the regex implementation behaves like Perl -- notably, by supporting possessive quantifiers but also being susceptible to catastrophic backtracking.
-
-
-
Method Detail
-
compile
CommonPattern compile(java.lang.String pattern)
Compiles the given pattern.- Throws:
java.lang.IllegalArgumentException- if the pattern is invalid
-
isPcreLike
boolean isPcreLike()
Returnstrueif the regex implementation behaves like Perl -- notably, by supporting possessive quantifiers but also being susceptible to catastrophic backtracking.
-
-