[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regexp help
From: |
Matthew Flaschen |
Subject: |
Re: regexp help |
Date: |
Fri, 02 Feb 2007 23:27:01 -0500 |
User-agent: |
Thunderbird 1.5.0.9 (X11/20070103) |
gokhalen@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
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
signature.asc
Description: OpenPGP digital signature
- regexp help, gokhalen, 2007/02/02
- Re: regexp help, HS, 2007/02/02
- Re: regexp help,
Matthew Flaschen <=
- Message not available
- Message not available