delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/05/04/23:53:07

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:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=V1AwflpqnLimOt62
d9W03GWKO4nzcjkjdP4UeIgjwoTmGo64lRMqkeSCdrWGkmym4THvD+GVPWn3KEkX
/rI1zPtWw4VpP9CiPO37SGr+r5WOAN3C49DHmLRS44r50ajYLunvx3vY1vH4CHIa
GUg30Bfr08szxahnKe+w0Htnz6E=
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=zMrJwZpBZmaJuEkEjaCtvN
o4jng=; b=binuC7QPgcLwQngk/3tOiV+3y6vj/a2abBJEm04Z2mI6ts3kgFOPQP
OkP4GxjkrokuE/zD0ttdw4EQAfRDe+Ce+JJI3n2E9KZgoFMb2ZUQhdTSOc7tXFfv
SKn4VFPOyYTl4Y03qxCOOf6SdqNk0b0aCoumiz7uIYURyect55JLg=
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=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*r:ip*192.168.1.100, H*RU:!192.168.1.100!, Hx-spam-relays-external:!192.168.1.100!, Hx-languages-length:694
X-HELO: smtp-out-so.shaw.ca
X-Authority-Analysis: v=2.3 cv=KuxjJ1eN c=1 sm=1 tr=0 a=MVEHjbUiAHxQW0jfcDq5EA==:117 a=MVEHjbUiAHxQW0jfcDq5EA==:17 a=IkcTkHD0fZMA:10 a=w5aJ8kaLLAry8Qfnm_kA:9 a=QEXdDO2ut3YA:10
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
Subject: Re: grep does not work with [^...]
To: cygwin AT cygwin DOT com
References: <1594742711 DOT 20180504163154 AT yandex DOT ru> <000901d3e3eb$5d56ddb0$18049910$@rogers.com> <5610703131 DOT 20180504182039 AT yandex DOT ru>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Message-ID: <66cd9158-483e-79de-0b69-575c7000347b@SystematicSw.ab.ca>
Date: Fri, 4 May 2018 21:52:50 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
MIME-Version: 1.0
In-Reply-To: <5610703131.20180504182039@yandex.ru>
X-CMAE-Envelope: MS4wfJLXPPDaMwgW40+3DMtaLnp618IYG+xGD68I3tUC2Wo4ceoyiFjg87mwNfE8h3tbU97Qv8V4gKxkIXHYAz1485g3dq8uGE9cGAYsmOxfNwboWOQ3kSCY dVf2Odepb2Wu5d2s1HXF621bSFxduhA0DUmletyJgGlYSCe4jKZWq5s943WvuRqEKZxkO5uecofHiw==
X-IsSubscribed: yes

On 2018-05-04 16:20, Dmitry Lanin wrote:
> Friday, May 4, 2018, 5:03:32 PM, Michel LaBarre wrote:
>>> On May 4, 2018 4:32 PM Dmitry Lanin wrote:
>>> Bug: grep does not work with [^...]
>>> Run the following command:
>>> echo qwe | grep -E '[^r]'
>>> Expected result:
>>> qwe
>>> Actual result:
>>> -nothing-
>> Run it in bash instead.
>> ^ is a quote character in CMD.
> 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]"

Safer to double it under cmd:
	> echo ^^
	^

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

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