MCPcopy Create free account
hub / github.com/google/re2j / compilePOSIX

Method compilePOSIX

java/com/google/re2j/RE2.java:179–181  ·  view source on GitHub ↗

compilePOSIX is like #compile but restricts the regular expression to POSIX ERE (egrep) syntax and changes the match semantics to leftmost-longest. That is, when matching against text, the regexp returns a match that begins as early as possible in the input (leftmost), and among

(String expr)

Source from the content-addressed store, hash-verified

177 * even well-defined. See http://swtch.com/~rsc/regexp/regexp2.html#posix
178 */
179 static RE2 compilePOSIX(String expr) throws PatternSyntaxException {
180 return compileImpl(expr, POSIX, /*longest=*/ true);
181 }
182
183 // Exposed to ExecTests.
184 static RE2 compileImpl(String expr, int mode, boolean longest) throws PatternSyntaxException {

Callers 1

ExecTestClass · 0.95

Calls 1

compileImplMethod · 0.95

Tested by

no test coverage detected