bug with grep 3.0.2 in cygwin 3.0.7
Fri Aug 30 07:55:00 GMT 2019
Greetings, Eliot Moss!
>>> 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.
Adding to the earlier answers (sorry, replying on the road is not efficient),
there's a https://www.regular-expressions.info/
Which contains a great deal of information about RE, their kinds, caveats and
implementations in various languages.
With best regards,
Friday, August 30, 2019 10:42:35
Sorry for my terrible english...
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin