"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.

I tested on a few flavors of Suns (sunos4.1.4, 5.5.1, 5.6, 5.7),
HPUX 10.20, Linux, irix 6.2 & 6.5, NetBSD 1.3.1, AIX 2.4.

I saw the earlier thread (on the autoconf list) on this topic where
someone found that `?' and \| were not portable.  Has anyone found a
system on which \{m,n\} is not portable?

Reply via email to