[gnu.emacs.bug] Bug in replace-regexp

boesch@VAX.DARPA.MIL (11/01/88)

I am using version 18.51.4
Try the following. I discovered it in a phone number processor.

I will use the convention <function> for gnu emacs functions or
special chars. All white space is to be ignored.


Start with a newly initialized emacs.

	1234567890<beginning-of-buffer><replace-regexp>
	123\(.......\)<cr>\1<cr>

This should have had the effect of replacing the "1234567890" in the
buffer with "4567890"  but it replaces it with "456789"

The problem does not occur if there is a cr in the buffer after the
"0"

Brian