On Tue, Aug 29, 2000 at 03:28:06PM -0700, Paul Eggert wrote:
>    Date: Tue, 29 Aug 2000 14:20:12 -0400 (EDT)
>    From: Pavel Roskin <[EMAIL PROTECTED]>
> 
>    I haven't checked the older versions, but this behaviour of GNU grep is
>    weird (it may or may not be a bug, dependent on the standard):
> 
>    $ echo foo |./grep -E ' *+'
>    foo
> 
> It is not a bug.  GNU grep extends the semantics of regular
> expressions so that 'x*+' is equivalent to '(x*)+'.  POSIX does not

I wouldn't call it an extension, since it breaks some existing scripts
(example was provided today).  It's a change in function.

> require that grep -E reject ' *+'; it merely says that the results are
> undefined.  So this behavior of GNU grep is correct even when

do you have that online?  I'm curious to see what other undefined things
are awaiting us.

> POSIXLY_CORRECT is set.

-- 
Thomas E. Dickey <[EMAIL PROTECTED]>
http://dickey.his.com
ftp://dickey.his.com

Reply via email to