public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@yandex.ru>
To: Eliot Moss <moss@cs.umass.edu>, cygwin@cygwin.com
Subject: Re: bug with grep 3.0.2 in cygwin 3.0.7
Date: Fri, 30 Aug 2019 07:55:00 -0000	[thread overview]
Message-ID: <42748516.20190830104400@yandex.ru> (raw)
In-Reply-To: <806ab587-a07c-1616-1486-ebb258ace1d9@cs.umass.edu>

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
>>> 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.

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,
Andrey Repin
Friday, August 30, 2019 10:42:35

Sorry for my terrible english...


--
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

  parent reply	other threads:[~2019-08-30  7:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1910922536.1217465852.1566975322390.JavaMail.root@zimbra76-e14.priv.proxad.net>
2019-08-28  8:32 ` akiki
2019-08-28 12:51   ` Eliot Moss
2019-08-28 13:33   ` Eric Blake
2019-08-29 19:20   ` Andrey Repin
2019-08-30  6:12     ` Eliot Moss
2019-08-30  7:48       ` Brian Inglis
2019-08-30 15:34         ` Eliot Moss
2019-08-30  7:50       ` Duncan Roe
2019-08-30 13:04         ` Jose Isaias Cabrera
2019-08-30  7:55       ` Andrey Repin [this message]
2019-09-23 14:42   ` Chris Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42748516.20190830104400@yandex.ru \
    --to=anrdaemon@yandex.ru \
    --cc=cygwin@cygwin.com \
    --cc=moss@cs.umass.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).