From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.help Subject: Re: regex question Date: Sun, 02 Sep 2007 20:44:34 +0200 Organization: Norwegian university of science and technology Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1188762043 31444 80.91.229.12 (2 Sep 2007 19:40:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 2 Sep 2007 19:40:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 02 21:40:41 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IRvJA-0008HO-Jx for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Sep 2007 21:40:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IRvJ9-0002cL-IC for geh-help-gnu-emacs@m.gmane.org; Sun, 02 Sep 2007 15:40:31 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!uio.no!ntnu.no!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: fiinbeck.math.ntnu.no Original-X-Trace: orkan.itea.ntnu.no 1188758674 17109 129.241.15.140 (2 Sep 2007 18:44:34 GMT) Original-X-Complaints-To: usenet@itea.ntnu.no Original-NNTP-Posting-Date: Sun, 2 Sep 2007 18:44:34 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (berkeley-unix) Cancel-Lock: sha1:xwpbDUo89B8f2x3HGJDTHB0lz4M= Original-Xref: shelby.stanford.edu gnu.emacs.help:151584 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:47110 Archived-At: + "Dave Pawson" : > 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 - It is undesirable to believe a proposition when there is no ground whatsoever for supposing it is true. -- Bertrand Russell