delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/05/04/18:21:15

X-Recipient: archive-cygwin AT delorie DOT 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:date:from:reply-to:message-id:to:cc:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=kjDUvauPcvEC0pJX
lPtkdxt2QdvMog1gUo6X/wjeavtMkn5uR1SUFOdizZP0t5bN7KnDWv13cmlQpJ11
N8z+oAb8q/G5peSmJmTM0bY7mIiasGSVnzsQC/oBP13GFKXgjAYpQnhoEN+1QRPP
vXp7qj4s3zri+KieSRyER3T5df0=
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:date:from:reply-to:message-id:to:cc:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=R6IkAZLvFFXBrydwUCK7m3
ROOL4=; b=W4ZP6DnLARDhtmijClri27/5nUeCSd4Sm7uOroJMx+2XnW8Ouq4EwY
ov4nF/BhMqbMcNJhzc9HB8On9IUyW7E/vIPAML8xfZRaupZV7MnfltxcdOI++rZD
pS1++0UTZwoab12XYhLblh3wPl2igtkfcBBq9f5J56ioecWGOip/Q=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=BAYES_00,CYGWIN_OWNER_BODY,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT,GIT_PATCH_2,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Michel, michel, guessed, D*ru
X-HELO: forward100p.mail.yandex.net
Authentication-Results: smtp4o.mail.yandex.net; dkim=pass header.i=@yandex.ru
Date: Fri, 4 May 2018 18:20:39 -0400
From: Dmitry Lanin <jjj17 AT yandex DOT ru>
Reply-To: Dmitry Lanin <jjj17 AT yandex DOT ru>
Message-ID: <5610703131.20180504182039@yandex.ru>
To: "Michel LaBarre" <michel DOT labarre AT rogers DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: grep does not work with [^...]
In-Reply-To: <000901d3e3eb$5d56ddb0$18049910$@rogers.com>
References: <1594742711 DOT 20180504163154 AT yandex DOT ru> <000901d3e3eb$5d56ddb0$18049910$@rogers.com>
MIME-Version: 1.0

Hello Michel,

Thank you.
Yes, I guessed it is a special character, so I tried (did not work):
echo qwe | grep -E '[\^r]'

I have finally figured out. Using double-quotes work:
echo qwe | grep -E "[^r]"

Kind regards,
Dmitry

Friday, May 4, 2018, 5:03:32 PM, you wrote:

ML> Run it in bash instead.
ML> ^ is a quote character in CMD.

>> -----Original Message-----
>> From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On
>> Behalf Of Dmitry Lanin
>> Sent: May 4, 2018 4:32 PM
>> To: cygwin AT cygwin DOT com
>> Subject: Bug: grep does not work with [^...]
>> 
>> Bug: grep does not work with [^...]
>> 
>> Run the following command:
>> echo qwe | grep -E '[^r]'
>> 
>> Expected result:
>> qwe
>> 
>> Actual result:
>> -nothing-
>> 
>> -----------------------------------
>> cygwin DLL version: 2.10.0
>> base-cygwin          3.8-1
>> bash                 4.4.12-3
>> coreutils            8.26-2
>> cygutils             1.4.16-2
>> cygwin               2.10.0-1
>> grep                 3.0-2
>> -----------------------------------
>> 
>> Kind regards,
>> Dmitry
>> 
>> 
>> --
>> 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




-- 
Best regards,
 Dmitry                            mailto:jjj17 AT yandex DOT ru


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019