Home | History | Annotate | Download | only in re2

Lines Matching refs:rewrite

357   // Replace the first match of "pattern" in "str" with "rewrite".
358 // Within "rewrite", backslash-escaped digits (\1 to \9) can be
360 // from the pattern. \0 in "rewrite" refers to the entire matching
372 const StringPiece& rewrite);
375 // of the pattern in the string with the rewrite. E.g.
389 const StringPiece& rewrite);
391 // Like Replace, except that if the pattern matches, "rewrite"
399 rewrite,
479 // Check that the given rewrite string is suitable for use with this
482 // to satisfy all of the \N tokens in rewrite
483 // * The rewrite string doesn't have any syntax errors. E.g.,
486 // fail because of a bad rewrite string.
487 bool CheckRewriteString(const StringPiece& rewrite, string* error) const;
489 // Returns the maximum submatch needed for the rewrite to be done by
490 // Replace(). E.g. if rewrite == "foo \\2,\\1", returns 2.
491 static int MaxSubmatch(const StringPiece& rewrite);
493 // Append the "rewrite" string, with backslash subsitutions from "vec",
496 // rewrite string. CheckRewriteString guarantees that the rewrite will
498 bool Rewrite(string *out,
499 const StringPiece &rewrite,