diff options
-rw-r--r-- | editors/sed.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/sed.c b/editors/sed.c index 3b0cebda6..ce4c42733 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -53,7 +53,7 @@ | |||
53 | - commands: (p)rint, (d)elete, (s)ubstitue (with g & I flags) | 53 | - commands: (p)rint, (d)elete, (s)ubstitue (with g & I flags) |
54 | - edit commands: (a)ppend, (i)nsert, (c)hange | 54 | - edit commands: (a)ppend, (i)nsert, (c)hange |
55 | - file commands: (r)ead | 55 | - file commands: (r)ead |
56 | - backreferences in substitution expressions (\1, \2...\9) | 56 | - backreferences in substitution expressions (\0, \1, \2...\9) |
57 | - grouped commands: {cmd1;cmd2} | 57 | - grouped commands: {cmd1;cmd2} |
58 | - transliteration (y/source-chars/dest-chars/) | 58 | - transliteration (y/source-chars/dest-chars/) |
59 | - pattern space hold space storing / swapping (g, h, x) | 59 | - pattern space hold space storing / swapping (g, h, x) |
@@ -600,7 +600,7 @@ static void do_subst_w_backrefs(const char *line, const char *replace) | |||
600 | /* go through the replacement string */ | 600 | /* go through the replacement string */ |
601 | for (i = 0; replace[i]; i++) { | 601 | for (i = 0; replace[i]; i++) { |
602 | /* if we find a backreference (\1, \2, etc.) print the backref'ed * text */ | 602 | /* if we find a backreference (\1, \2, etc.) print the backref'ed * text */ |
603 | if (replace[i] == '\\' && replace[i+1]>'0' && replace[i+1]<='9') { | 603 | if (replace[i] == '\\' && replace[i+1]>='0' && replace[i+1]<='9') { |
604 | int backref=replace[++i]-'0'; | 604 | int backref=replace[++i]-'0'; |
605 | 605 | ||
606 | /* print out the text held in regmatch[backref] */ | 606 | /* print out the text held in regmatch[backref] */ |