Lines Matching +defs:replace +defs:match
244 bool subGlobal:1; /* 'g': replace as often as possible */
245 bool subOnce:1; /* '1': replace only once */
246 bool anchorStart:1; /* '^': match only at start of word */
247 bool anchorEnd:1; /* '$': match only at end of word */
1118 * replace its value.
1509 const char *match;
1547 /* unanchored case, may match more than once */
1548 while ((match = Substring_Find(word, args->lhs)) != NULL) {
1549 SepBuf_AddRange(buf, word.start, match);
1552 word.start = match + lhsLen;
1571 /* In the modifier ':C', replace a backreference from \0 to \9. */
1582 Error("No match for subexpression \\%u", n);
1595 RegexReplace(Substring replace, SepBuf *buf, const char *wp,
1600 for (rp = replace.start; rp != replace.end; rp++) {
1601 if (*rp == '\\' && rp + 1 != replace.end &&
1604 else if (*rp == '\\' && rp + 1 != replace.end &&
1619 Substring replace;
1652 RegexReplace(args->replace, buf, wp, m, args->nsub);
2093 /* Not a match, try the ':from=to' modifier as well. */
2195 * escaped and replace unescaped ampersands with subst->lhs.
2998 args.replace = LazyBuf_Get(&replaceBuf);