delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/01/22/01:46:55

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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=G/ijvCn8lSen3/0qssnu5B5PwVCb70/WOu2ePG6Dmbc
M+ad4p+8OxBSbPz8/SDUUTfnqhMkcSkf03J+W6tchYPAKzJomV25ly/8lX5ojHRm
mqeLO4V4X7t7WzjesfLI6zSIi3A1xW42qek+oaOaW6+AAjqna9XEt0l1gPwvnLaA
=
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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=plA6r7ZKk80iqiasjstrP3ZVcKw=; b=gyQeMkJviGiDZe9Fc
Wrmd9maVHIZruziJnaqLUb5mIiyy1Cd+Jwm/8KKK0JQLxqwFoOOy5Fx6qxTSFRE5
9pAKEo2cqCdLC4KB71OAD2ZkiEwZ4LzgZYLA0WsG+mc/WHZDUitasJwazTeMURTl
FQJp06g93xuJW7p6tsesUmuYpg=
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.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-ea0-f181.google.com
X-Received: by 10.14.176.195 with SMTP id b43mr28279301eem.39.1390373179397; Tue, 21 Jan 2014 22:46:19 -0800 (PST)
Message-ID: <52DF6930.70503@gmail.com>
Date: Wed, 22 Jan 2014 07:46:08 +0100
From: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygcheck and literal plus sign
References: <CAAXzdLUjc=cYva6EfZQjRArt5NQbPG3VTTGEch=kN1GEx2-fjA AT mail DOT gmail DOT com> <20140122055830 DOT GB4286 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20140122055830.GB4286@ednor.casa.cgf.cx>
X-IsSubscribed: yes

On 22/01/2014 06:58, Christopher Faylor wrote:
> On Tue, Jan 21, 2014 at 05:59:16PM -0600, Steven Penny wrote:
>> Searching for the popular compiler produces unexpected results
>>
>>     $ cygcheck -p 'g++.exe'
>>     Found 0 matches for g  .exe
>>
>>     $ cygcheck -p 'g\+\+.exe'
>>     Found 0 matches for g\ \ .exe
>>
>> How can I include a literal '+' (plus character) in my search?
>
> By remembering that this is a regex search.  How do you quote special characters
> in regexes?  Answer: With a '\'.
>

I am surely dumb, but whatever and how many '\' are used
the '+' is always returned as a ' ' in the reply.

So the specific example will be appreciated,
as a single quoting usually works in regexes

  $ cd /etc/setup
  $ zcat gcc-g++.lst.gz |grep -P "g\+\+"
usr/bin/g++.exe
usr/bin/i686-pc-cygwin-g++.exe
usr/share/man/man1/g++.1.gz

Is something "sanitizing" the query on server side to avoid
nasty surprise ?

  $ zcat gcc-g++.lst.gz |grep  -P "g++" |wc -l
723


Marco



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