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

Method compile

java/com/google/re2j/RE2.java:157–159  ·  view source on GitHub ↗

Parses a regular expression and returns, if successful, an RE2 instance that can be used to match against text. When matching against text, the regexp returns a match that begins as early as possible in the input (leftmost), and among those it chooses the one that a backtracking search

(String expr)

Source from the content-addressed store, hash-verified

155 * backtracking. For POSIX leftmost-longest matching, see {@link #compilePOSIX}.
156 */
157 static RE2 compile(String expr) throws PatternSyntaxException {
158 return compileImpl(expr, PERL, /*longest=*/ false);
159 }
160
161 /**
162 * {@code compilePOSIX} is like {@link #compile} but restricts the regular expression to POSIX ERE

Callers 15

testReplaceAllFuncMethod · 0.95
testMatchMethod · 0.95
testCompileMethod · 0.95
replaceTestHelperMethod · 0.95
testFindUTF8Method · 0.95
testFindMethod · 0.95
testFindUTF8IndexMethod · 0.95
testFindIndexMethod · 0.95
testFindAllUTF8Method · 0.95
testFindAllMethod · 0.95
testFindAllUTF8IndexMethod · 0.95
testFindAllIndexMethod · 0.95

Calls 1

compileImplMethod · 0.95

Tested by 15

testReplaceAllFuncMethod · 0.76
testMatchMethod · 0.76
testCompileMethod · 0.76
replaceTestHelperMethod · 0.76
testFindUTF8Method · 0.76
testFindMethod · 0.76
testFindUTF8IndexMethod · 0.76
testFindIndexMethod · 0.76
testFindAllUTF8Method · 0.76
testFindAllMethod · 0.76
testFindAllUTF8IndexMethod · 0.76
testFindAllIndexMethod · 0.76