"[char]*$" S&R regexp doing double-pass?

Bert Wesarg bert.wesarg at googlemail.com
Tue Feb 24 16:41:51 CET 2009


On Tue, Feb 24, 2009 at 15:08, Offer Kaye <offer.kaye at gmail.com> wrote:
> Hi,
Hi,

> I'm not sure whether this is a bug or feature.
> I first noticed it when using the regexp "\s*$" in the "Find" section
> of the "Find and Replace" dialog, and doing a (regexp) replace for
> some character, for example ";", I see ";" inserted twice if there are
> one or more space characters at the end of the line, instead of just
> once (as is the case if there are no spaces).
>
> So if for example I started with:
> 1
> 2<space>
> 3<space><space>
> 4<space><space><space>
>
> And did the above search/replace, I end up with:
> 1;
> 2;;
> 3;;
> 4;;
>
> To debug, I tried starting with:
> 0
> 1a
> 2aa
> 3aaa
> 4aaaa
Can't reproduce with:

NEdit release of Nov  5, 2008

     Built on: Linux, x86-64, GNU C
     Built at: Feb 24 2009, 16:29:35
   With Motif: 2.2.3 [@(#)Motif Version 2.2.3]
Running Motif: 2.2 [unknown]
       Server: The X.Org Foundation 10502000
       Visual: 24-bit TrueColor (ID 0x25, Default)
       Locale: en_US.UTF-8

Which version are you using?

Bert


More information about the Discuss mailing list