help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: regex question


From: Kai Großjohann
Subject: Re: regex question
Date: Mon, 19 May 2003 18:26:23 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

upro <address@hidden> writes:

> I want to use M-x replace-regexp like this
>
> s/[a-z]''/$1"/g

In Emacs, you need to use \1 instead of $1, I think.  (You may have
to use \\1.)

Also, \1 always refers to a matching parenthesis, and square brackets
are not regarded as parens for this purpose.  So you need to say
\([a-z]\) if you use it interactively and \\([a-z]\\) if you use it
from Lisp.
-- 
This line is not blank.


reply via email to

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