X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:reply-to:subject:to:references:from:message-id
	:date:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=SP2dcXqm2mO5GC+y
	v6OD60YQw6yTW7fgWcXJgCTmSvgfmXSiN1mneE3vRIBM1RV+HBL9MMMIy1EX02Er
	i+GFkDyvB/9qWzgPlgTvHXglWURl0VbO9cvy52BOyswVFGpPrj2PUrjOoeCjA4gR
	sQRCvc/o+1QJ79wn19UBrVgjLA4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:reply-to:subject:to:references:from:message-id
	:date:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=lONDi3wIxk1GrjP1XPfdrE
	9g6+M=; b=XPkENMICKyrJ8gDHOSYCR6cRORaZ1e9iICenbPlqhVxRTfYK0XdI7t
	2dQ9RPvNcq0N7iQbSwy+galjnegjvSMiEXKaePFM4j9EQ3GEOqLTKvsk/ZQACtx2
	nLOwYW14Rno3EodX1P/qTigNp7NntJqg+tPcrKeujuJG9KTogtP6U=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,SPF_PASS autolearn=no version=3.3.1 spammy=Greetings
X-HELO: mailsrv.cs.umass.edu
Reply-To: moss@cs.umass.edu
Subject: Re: bug with grep 3.0.2 in cygwin 3.0.7
To: cygwin@cygwin.com
References: <1910922536.1217465852.1566975322390.JavaMail.root@zimbra76-e14.priv.proxad.net> <1207614124.1217647925.1566976580120.JavaMail.root@zimbra76-e14.priv.proxad.net> <8910174142.20190829220811@yandex.ru>
From: Eliot Moss <moss@cs.umass.edu>
Message-ID: <806ab587-a07c-1616-1486-ebb258ace1d9@cs.umass.edu>
Date: Thu, 29 Aug 2019 21:42:46 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <8910174142.20190829220811@yandex.ru>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

On 8/29/2019 3:08 PM, Andrey Repin wrote:
> Greetings, akiki@free.fr!
> 
>> Hi,
>> 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
>> but
>> 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'
> 
> Yes.
> 
>> Is-it a bug ?
> 
> No.
> 
>> 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.

Regards - EM

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

