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