Lines Matching defs:match
44 address matches one line, a pair of comma separated addresses match
47 each file can match.
140 p Print the line if match was found and replaced
141 w [file] Write (append) line to file if match replaced
143 t [label] Test, jump to :label only if an "s" command found a match in
146 T [label] Test false, jump only if "s" hasn't found a match.
185 // Begin and end of each match
213 // neither the pattern nor the match can currently include NUL bytes
314 // In a match that might end?
321 // regex match end includes matching line, so defer deactivation
326 // Start a new match?
337 // Didn't match?
340 // Deferred disable from regex end match
359 // A deleted line can still update line match state for later commands
488 regmatch_t *match = (void *)toybuf;
492 // Find match in remaining line (up to remaining len)
493 while (!ghostwheel(reg, rline, rlen, 10, match, mflags)) {
496 // Zero length matches don't count immediately after a previous match
497 mlen = match[0].rm_eo-match[0].rm_so;
505 // If we're replacing only a specific match, skip if this isn't it
508 rline += match[0].rm_eo;
509 rlen -= match[0].rm_eo;
515 if (match[0].rm_eo > INT_MAX) perror_exit(0);
527 newlen += match[cc].rm_eo-match[cc].rm_so;
530 // Allocate new size, copy start/end around match. (Can't extend in
534 rswap = swap+(rline-line)+match[0].rm_so;
535 memcpy(swap, line, (rline-line)+match[0].rm_so);
536 memcpy(rswap+newlen, rline+match[0].rm_eo, (rlen -= match[0].rm_eo)+1);
549 } else if (match[cc].rm_so == -1) error_exit("no s//\\%d/", cc);
556 ll = match[cc].rm_eo-match[cc].rm_so;
557 memcpy(rswap+mlen, rline+match[cc].rm_so, ll);