From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "HS" Newsgroups: gmane.emacs.help Subject: Re: regexp help Date: 2 Feb 2007 19:37:37 -0800 Organization: http://groups.google.com Message-ID: <1170473857.653542.180360@v33g2000cwv.googlegroups.com> References: <1170458444.534992.259290@a75g2000cwd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1170474038 23417 80.91.229.12 (3 Feb 2007 03:40:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 3 Feb 2007 03:40:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 03 04:40:31 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 1HDBlN-0005bQ-TV for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Feb 2007 04:40:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HDBlN-000682-Ew for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Feb 2007 22:40:29 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!postnews.google.com!v33g2000cwv.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-NNTP-Posting-Host: 200.213.54.240 Original-X-Trace: posting.google.com 1170473864 28736 127.0.0.1 (3 Feb 2007 03:37:44 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 3 Feb 2007 03:37:44 +0000 (UTC) In-Reply-To: <1170458444.534992.259290@a75g2000cwd.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: v33g2000cwv.googlegroups.com; posting-host=200.213.54.240; posting-account=pG57fA0AAADtQ-4h1MyvjXjZpSNZC0zj Original-Xref: shelby.stanford.edu gnu.emacs.help:145256 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:40862 Archived-At: On 2 fev, 20:20, gokha...@gmail.com wrote: > Hi, > > I needed to replace lines matching the following pattern > > "hello 123456123456" > > with > > "hello 123456 123456" > > I used > > M-x replace-regexp RET hello ...... RET \& / > * NOTE: a white space follows the \& */ > > To do this. > > I was wondering how I would do this with the \d construct. That is how > would I do this along the lines of > > M-x replace-regexp RET hello \(......\)\1 RET hello \1 /* > NOTE: a white space follows the \1 */ > > Thanks, > > -Nachiket. There's no \d construct.... Can't you record a keyboard macro ? it might be easier!