Lines Matching defs:match
49 address matches one line, a pair of comma separated addresses match
52 each file can match. The second address can be +N to end N lines later.
72 ! Run this command when the test _didn't_ match.
147 p Print the line if match was found and replaced
148 w [file] Write (append) line to file if match replaced
150 t [label] Test, jump to :label only if an "s" command found a match in
153 T [label] Test false, jump only if "s" hasn't found a match.
198 // Begin and end of each match
199 long lmatch[2]; // line number of match
298 // In a match that might end?
305 // regex match end includes matching line, so defer deactivation
311 // Start a new match?
324 // Didn't match?
327 // Deferred disable from regex end match
346 // A deleted line can still update line match state for later commands
478 regmatch_t *match = (void *)toybuf;
483 // Loop finding match in remaining line (up to remaining len)
484 while (!regexec0(reg, rline, len-(rline-line), 10, match, mflags)) {
487 // Zero length matches don't count immediately after a previous match
488 mlen = match[0].rm_eo-match[0].rm_so;
496 // If we're replacing only a specific match, skip if this isn't it
499 memcpy(l2+l2used, rline, match[0].rm_eo);
500 l2used += match[0].rm_eo;
501 rline += match[0].rm_eo;
507 if (match[0].rm_eo > INT_MAX) perror_exit(0);
519 newlen += match[cc].rm_eo-match[cc].rm_so;
527 if (match[0].rm_so) {
528 memcpy(l2+l2used, rline, match[0].rm_so);
529 l2used += match[0].rm_so;
550 if (match[cc].rm_so != -1) {
551 ll = match[cc].rm_eo-match[cc].rm_so;
552 memcpy(l2+l2used+mlen, rline+match[cc].rm_so, ll);
557 rline += match[0].rm_eo;
759 // sed_line() it means the match range attached to this command