aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/search.texi12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index d841934c855..b41214df1ae 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -1356,12 +1356,12 @@ Replace every match for @var{regexp} with @var{newstring}.
1356it can refer to all or part of what is matched by the @var{regexp}. 1356it can refer to all or part of what is matched by the @var{regexp}.
1357@samp{\&} in @var{newstring} stands for the entire match being 1357@samp{\&} in @var{newstring} stands for the entire match being
1358replaced. @samp{\@var{d}} in @var{newstring}, where @var{d} is a 1358replaced. @samp{\@var{d}} in @var{newstring}, where @var{d} is a
1359digit, stands for whatever matched the @var{d}th parenthesized 1359digit starting from 1, stands for whatever matched the @var{d}th
1360grouping in @var{regexp}. (This is called a ``back reference''.) 1360parenthesized grouping in @var{regexp}. (This is called a ``back
1361@samp{\#} refers to the count of replacements already made in this 1361reference''.) @samp{\#} refers to the count of replacements already
1362command, as a decimal number. In the first replacement, @samp{\#} 1362made in this command, as a decimal number. In the first replacement,
1363stands for @samp{0}; in the second, for @samp{1}; and so on. For 1363@samp{\#} stands for @samp{0}; in the second, for @samp{1}; and so on.
1364example, 1364For example,
1365 1365
1366@example 1366@example
1367M-x replace-regexp @key{RET} c[ad]+r @key{RET} \&-safe @key{RET} 1367M-x replace-regexp @key{RET} c[ad]+r @key{RET} \&-safe @key{RET}