From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Flaschen Newsgroups: gmane.emacs.help Subject: Re: regexp help Date: Fri, 02 Feb 2007 23:27:01 -0500 Message-ID: <45C40F15.8060901@gatech.edu> References: <1170458444.534992.259290@a75g2000cwd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1253839713==" X-Trace: sea.gmane.org 1170476854 28567 80.91.229.12 (3 Feb 2007 04:27:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 3 Feb 2007 04:27:34 +0000 (UTC) To: emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 03 05:27:27 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 1HDCUo-0000lv-Ps for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Feb 2007 05:27:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HDCUo-00019P-85 for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Feb 2007 23:27:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HDCUa-00019J-5W for help-gnu-emacs@gnu.org; Fri, 02 Feb 2007 23:27:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HDCUX-000197-P5 for help-gnu-emacs@gnu.org; Fri, 02 Feb 2007 23:27:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HDCUX-000194-JG for help-gnu-emacs@gnu.org; Fri, 02 Feb 2007 23:27:09 -0500 Original-Received: from deliverator4.gatech.edu ([130.207.165.164]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1HDCUX-0003bD-91 for help-gnu-emacs@gnu.org; Fri, 02 Feb 2007 23:27:09 -0500 Original-Received: from deliverator4.gatech.edu (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 094C2A4F0 for ; Fri, 2 Feb 2007 23:27:08 -0500 (EST) (envelope-from matthew.flaschen@gatech.edu) Original-Received: from mailprx4.gatech.edu (mailprx4.prism.gatech.edu [130.207.171.18]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "smtp.mail.gatech.edu", Issuer "RSA Data Security, Inc." (verified OK)) by deliverator4.gatech.edu (Postfix) with ESMTP id 9B3A3A4F1 for ; Fri, 2 Feb 2007 23:27:07 -0500 (EST) (envelope-from matthew.flaschen@gatech.edu) Original-Received: from [128.61.73.81] (r73h81.res.gatech.edu [128.61.73.81]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (sasl: method=PLAIN, username=mflaschen3@mailprx4.gatech.edu, sender=n/a) by mailprx4.gatech.edu (Postfix) with ESMTP id 3B2C621F3 for ; Fri, 2 Feb 2007 23:27:07 -0500 (EST) (envelope-from matthew.flaschen@gatech.edu) User-Agent: Thunderbird 1.5.0.9 (X11/20070103) In-Reply-To: <1170458444.534992.259290@a75g2000cwd.googlegroups.com> X-Enigmail-Version: 0.94.1.2 X-detected-kernel: Solaris 9 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:40863 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============1253839713== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD458A070BECF9FF855FDFA18" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD458A070BECF9FF855FDFA18 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable gokhalen@gmail.com wrote: > Hi, >=20 > I needed to replace lines matching the following pattern >=20 > "hello 123456123456" >=20 > with >=20 > "hello 123456 123456" >=20 > I used >=20 > M-x replace-regexp RET hello ...... RET \& / > * NOTE: a white space follows the \& */ >=20 > To do this. >=20 > I was wondering how I would do this with the \d construct. That is how > would I do this along the lines of I'm not sure, but I think you want this: M-x replace-regexp \([0-9][0-9][0-9][0-9][0-9][0-9]\)\([0-9][0-9][0-9][0-9][0-9][0-9]\) RET \1 \2 RET There may be some way to avoid repeating the [0-9] but I couldn't figure that out. Matthew Flaschen --------------enigD458A070BECF9FF855FDFA18 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFxA8aQ5LSyju97VkRAkVVAKCvnED8QbnycWy5GcuTtQR1ea9uvQCfcjqy nqG9np4ON5SPKROKaFFRBr8= =LrCC -----END PGP SIGNATURE----- --------------enigD458A070BECF9FF855FDFA18-- --===============1253839713== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============1253839713==--