[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ed] Searching for multiple matches with \+ isn't working

From: John Cowan
Subject: Re: [Bug-ed] Searching for multiple matches with \+ isn't working
Date: Wed, 2 Jan 2019 16:07:54 -0500

ed uses Posix basic REs, and the use of \+ in basic REs to get the effect of + in extended REs is a non-Posix extension.  See <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_05_01>, where there is no mention of \+ except its use in extended REs.  The same is true of escaped ?, (, ), |, {.

The `info ed` command documents that exactly which regular _expression_ characters work depends on the regex package with which ed was built.

John Cowan          http://vrici.lojban.org/~cowan        address@hidden
He made the Legislature meet at one-horse tank-towns out in the alfalfa
belt, so that hardly nobody could get there and most of the leaders
would stay home and let him go to work and do things as he pleased.
    --H.L. Mencken's translation of the Declaration of Independence

On Wed, Jan 2, 2019 at 3:52 PM Brian Zwahr <address@hidden> wrote:
I'm having an issue where using \+ to search for multiple matches isn't working. Am I doing something wrong?

I have GNU ed 1.14.2 installed on the latest macOS through Homebrew (https://brew.sh). Homebrew installed the executable as ged instead of ed, to not overtake the BSD ed that ships with macOS. I mention this so you understand why the command I'm running is ged instead of ed.

I see that 1.15 is in pre-release, but I don't see this issue addressed in the changelogs I'm seeing in the archives of this list.

Here are steps to reproduce:

$ ged -v
# Let's add a couple of lines.
# Great! Now, let's search for "o".
# Both lines match. Perfect. Now, let's search for multiple "o"s.
# Not found? :-(
Warning: buffer modified

Proof of version:

$ ged -V
GNU ed 1.14.2
Copyright (C) 1994 Andrew L. Moore.
Copyright (C) 2017 Antonio Diaz Diaz.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

bug-ed mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]