[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep: 'a?[^b]' != 'a(?)[^b]'
From: |
Alain Magloire |
Subject: |
Re: grep: 'a?[^b]' != 'a(?)[^b]' |
Date: |
Thu, 15 Nov 2001 16:39:56 -0500 (EST) |
>
> Hello,
> I have tested the following with grep version 2.2, 2.4, 2.4.2 and
> 2.5e (at least 'a?[^b]' != 'a(?)[^b]'. Is this a bug?
> by the way, thanks for that great tool (grep) ;)
>
> Peter
> ===========
>
> $ grep -E "a(?)[^b]"
This, in theory, is a mistake the operator '?'
needs a preceding char. An implementation can
interpret it however it likes.
Solaris /usr/xpg4/bin/grep -E seems to reject it.
But GNU grep accepts it.