This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bug with grep 3.0.2 in cygwin 3.0.7

On 8/30/2019 2:12 AM, Brian Inglis wrote:
On 2019-08-29 19:42, Eliot Moss wrote:
On 8/29/2019 3:08 PM, Andrey Repin wrote:
I encounter some problem with grep option -E on cygwin 3.0.7
echo "a^b" | grep "a^b" #answer a^b ie it's OK
echo "a^b" | grep -E "a^b" #answer nothing " for me it's KO
That's an expected result of an impossible constraint.
I have to backslash ^ to be OK like : grep -E 'a\^b'
Is-it a bug ?
I don't know if all versions of cygwin and grep are concerned.
RTFM, this is regexp basics.
There was a really great answer to this earlier.  I tried an
answer, but was wrong.  One has to read the "fine print" really
carefully.  At first I thought it was a bug, at least in the
documentation, but the meaning of a^b, when ^ is the metacharacter,
is kind of subtle (IMO at least).  It's easy to miss that
subtlety and think that if ^ is not at the beginning of an
expression it will be treated as an ordinary character ...
But my main point is that RTM would be enough; RTFM seemed
to me perhaps a little more rude than necessary. exists and has been amusing rather than rude
in our industry for decades, especially in non-native English locales e.g. here
in this list: "Read The Fine Manual"; but RTM for software products is usually
"Release To Manufacturing", from the days when media was produced!

Ok, I relent!  E

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]