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

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

Re: regex question


From: Tassilo Horn
Subject: Re: regex question
Date: Sun, 02 Sep 2007 20:30:58 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

"Dave Pawson" <dave.pawson@gmail.com> writes:

> I have text reading 'try>Letter'  e.g. 'try[A'
> and I want to do a search/replace using regex.
>
> I want to replace it with 'try text>A
>
> I.e. I want to retain the group ([A-E])
> so that the finished text reads 'try text>A
>
> Does emacs regex support groups please?

Sure it does.

M-x replace-regexp \(try\)\(\>.\) RET \1 text\2 RET

Bye,
Tassilo
-- 
Früher haben wir vor dem Essen  immer gebetet, aber jetzt hat meine Frau
einen Kochkurs gemacht.


reply via email to

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