From: Chris Wagner <wagnerc@plebeian.com>
To: cygwin@cygwin.com, akiki@free.fr
Subject: Re: bug with grep 3.0.2 in cygwin 3.0.7
Date: Mon, 23 Sep 2019 14:42:00 -0000 [thread overview]
Message-ID: <fb192d0702faa9d2fe20048d58b4cf13@plebeian.com> (raw)
In-Reply-To: <1207614124.1217647925.1566976580120.JavaMail.root@zimbra76-e14.priv.proxad.net>
On 2019-08-28 3:16 am, akiki@free.fr wrote:
> 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
>
>
> 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.
Hi Akiki. As others mentioned, it has to do with how regular
expressions operate. However the best solution for you in this
situation is to not use regular expressions. To search for fixed
strings, use fgrep or grep -F. That avoids all issues with meta
characters and covers the vast majority of cases when we use grep
anyway.
To use full power regular expressions read perlre and use grep -P.
Thanks.
--
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
prev parent reply other threads:[~2019-09-22 18:54 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
2019-09-23 14:42 ` Chris Wagner [this message]
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=fb192d0702faa9d2fe20048d58b4cf13@plebeian.com \
--to=wagnerc@plebeian.com \
--cc=akiki@free.fr \
--cc=cygwin@cygwin.com \
/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).