[Top][All Lists]

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

Re: Emacs replace-regexp

From: Andreas Madsack
Subject: Re: Emacs replace-regexp
Date: Mon, 26 Jul 2004 12:50:18 +0200
User-agent: KMail/1.6.1

Am Monday 26 July 2004 12:35 schrieb Thomas Ruschival:
> Hi,
> I guess I am too stupid to read the regexp syntax of Emacs I can't figure
> out how to access parts of the match for replace like in perl or awk with
> $1,$2....
> I'd like to put brackets around the hyperlinks of a latex-document.
> do I did a replace-regexp "(\ref\{.*\})" "\[$1\]"
> and it doesn't do the trick. so I played a little while with the syntax and
> all I got out were "$1" on each place where once was a hyperlink....hmmm.

In emacs-regex it's \1,\2,...

your latex-brackets problem: \(\ref{.*}\) -> [\1]

for more help on replace-regexp: C-h f replace-regexp

<>< Andreas Madsack
PGP/GnuPG key: 1024D/FD6A8D9D

reply via email to

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