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

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

Re: regex question


From: Harald Hanche-Olsen
Subject: Re: regex question
Date: Sun, 02 Sep 2007 20:44:34 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (berkeley-unix)

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

> I have text reading 'try>Letter'  e.g. 'try[A'
> and I want to do a search/replace using regex.

I'm confused.  Is that '[' above a typo, or do you have some problem
that is more complicated than it looks?

> 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?

Yes.  I assume you have checked the info file that comes with emacs?
There is a whole section devoted to regular expressions.  The answer
you seek seems to be in a separate section (Regexp Backslash), at
least in the version I am currently using.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
  when there is no ground whatsoever for supposing it is true.
  -- Bertrand Russell


reply via email to

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