emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

query-replace-regexp: Can't use \0 in TO-STRING


From: zhanghj
Subject: query-replace-regexp: Can't use \0 in TO-STRING
Date: Sat, 06 May 2017 08:48:01 +0800

The doc says:
In TO-STRING, ‘\&’ or ‘\0’ stands for whatever matched the whole of
REGEXP, and ‘\N’ (where N is a digit) stands for whatever matched
the Nth ‘\(...\)’ (1-based) in REGEXP.  The ‘\(...\)’ groups are
counted from 1.

But when using \0, emacs gives the following error message: 
match-substitute-replacement: Invalid use of ‘\’ in replacement text

Using \& is OK.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]