NetBSD-Bugs archive

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

Re: bin/53885 (awk ERE bug)

Op 18-01-19 om 15:35 schreef
> nawk doesn't support {} in regular expressions. e.g. this also fails:
> echo "aaa" | nawk '/a{3}/ { print "matched" }'
> As Kernigham notes in changing
> this would be very difficult.

POSIX requires that awk supports standard EREs[*1] which include bounds
(interval expressions)[*2], and it has done for many years[*3].

If it is true that nawk's ERE implementation is so "exceedingly
complicated and fragile" that adding a basic and standard ERE feature
would be too difficult, then this awk is broken by design and you should
consider using some other awk implementation as the default awk.

- M.


[*2] point 5 at

[*3] I was able to verify this back to the 2004 version, but the
requirement may well be older. In any case 2004 is 15 years ago now.

Home | Main Index | Thread Index | Old Index