> From: Jim Meyering <[EMAIL PROTECTED]>
> Date: 11 Aug 2000 20:11:25 +0200
>
> "Eli Zaretskii" <[EMAIL PROTECTED]> writes:
> | > | Also, is \{0,1\} supported in all versions of
> | > | Sed?
> | >
> | > I'm almost positive that it's not portable.
> |
> | Then what is the portable repacement for the ? operator (which isn't
> | part of the basic regexps, and therefore isn't supported by Sed)?
>
> I'm not so sure now.
> I've tested on a pretty wide range of systems
> (did this: for i in $(type -a -p sed); do echo bc |$i 's/a\{0,1\}bc/x/';done)
> and it worked fine (printed `x') for each version of sed on each of those
> systems.
Accordng to my references, \{ and \} belong to the basic REs supported
by ed(1), and that's what Sed uses.
> I saw the earlier thread (on the autoconf list) on this topic where
> someone found that `?' and \| were not portable.
That's true: ? and \| are *not* part of BREs. That's why I didn't use
? in the first place.