[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible bug in replace-regexp?
From: |
Moira |
Subject: |
Possible bug in replace-regexp? |
Date: |
Wed, 21 Nov 2007 00:59:52 +0100 |
Hi.
I've just attempted some regular expression search/replace in emacs -
a thing I like to do in editors - and noticed some strange behaviour.
I thought I'd rather ask here before posting a bug-report to early.
If my search contains a grouped quantor like this "myString\(.*?\)" a
C-q,C-j newline in the replacement is added *before* the groups
backreference, even if it's placed behind it.
Like in this replace: "myString\1[emacs C-q,C-j comes here]".
This should yield:
>>>
...
some-stuff
myString more-stuff-in-the-myString-line
the-rest
...
<<<
Instead it causes this:
>>>
...
some-stuff
myString
more-stuff-in-the-myString-line the-rest
...
<<<
I should add that this is Aquaemacs, a native GUI Emacs port for OS
X. I haven't tried it the CLI version yet and I'm not 100% sure C-q,C-
j is the way of putting a newline into the replacement.
Is this a bug (read: can you guys reproduce it?) and/or are there
other ways to approach this problem?
Thanks for any advice and input on the subject.
Phillip
- Possible bug in replace-regexp?,
Moira <=