Home | History | Annotate | Download | only in util

Lines Matching refs:pattern

51 void PCRE::Init(const char* pattern, Option options, int match_limit,
53 pattern_ = pattern;
66 << "Error compiling '" << pattern << "': illegal regexp option";
75 PCRE::PCRE(const char* pattern) {
76 Init(pattern, None, 0, 0, true);
78 PCRE::PCRE(const char* pattern, Option option) {
79 Init(pattern, option, 0, 0, true);
81 PCRE::PCRE(const string& pattern) {
82 Init(pattern.c_str(), None, 0, 0, true);
84 PCRE::PCRE(const string& pattern, Option option) {
85 Init(pattern.c_str(), option, 0, 0, true);
87 PCRE::PCRE(const string& pattern, const PCRE_Options& re_option) {
88 Init(pattern.c_str(), re_option.option(), re_option.match_limit(),
92 PCRE::PCRE(const char *pattern, const PCRE_Options& re_option) {
93 Init(pattern, re_option.option(), re_option.match_limit(),
109 // UNANCHORED Compile the original pattern, and use
111 // ANCHOR_START Compile the original pattern, and use
113 // ANCHOR_BOTH Tack a "\z" to the end of the original pattern
229 const PCRE& pattern,
268 if (pattern.DoMatchImpl(*input, ANCHOR_START, &consumed,
278 const PCRE& pattern,
317 if (pattern.DoMatchImpl(*input, UNANCHORED, &consumed,
327 const PCRE& pattern,
330 int matches = pattern.TryMatch(*str, 0, UNANCHORED, true, vec, kVecSize);
335 if (!pattern.Rewrite(&s, rewrite, *str, vec, matches))
345 const PCRE& pattern,
366 matches = pattern.TryMatch(*str, start, ANCHOR_START, false,
376 matches = pattern.TryMatch(*str, start, UNANCHORED, true, vec, kVecSize);
385 pattern.Rewrite(&out, rewrite, *str, vec, matches);
401 const PCRE& pattern,
405 int matches = pattern.TryMatch(text, 0, UNANCHORED, true, vec, kVecSize);
409 return pattern.Rewrite(out, rewrite, text, vec, matches);
577 // If we got here, we must have matched the whole pattern.
632 PCREPORT(ERROR) << "invalid rewrite pattern: " << rewrite.data();
686 NULL, // We did not study the pattern