From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4938 invoked by alias); 22 Jan 2014 06:46:25 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 4926 invoked by uid 89); 22 Jan 2014 06:46:24 -0000 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 Received: from mail-ea0-f181.google.com (HELO mail-ea0-f181.google.com) (209.85.215.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 22 Jan 2014 06:46:22 +0000 Received: by mail-ea0-f181.google.com with SMTP id m10so4276893eaj.26 for ; Tue, 21 Jan 2014 22:46:19 -0800 (PST) X-Received: by 10.14.176.195 with SMTP id b43mr28279301eem.39.1390373179397; Tue, 21 Jan 2014 22:46:19 -0800 (PST) Received: from [192.168.2.112] (p5B298A43.dip0.t-ipconnect.de. [91.41.138.67]) by mx.google.com with ESMTPSA id 8sm2471867eeq.15.2014.01.21.22.46.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 22:46:17 -0800 (PST) Message-ID: <52DF6930.70503@gmail.com> Date: Wed, 22 Jan 2014 06:46:00 -0000 From: Marco Atzeri 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@cygwin.com Subject: Re: cygcheck and literal plus sign References: <20140122055830.GB4286@ednor.casa.cgf.cx> In-Reply-To: <20140122055830.GB4286@ednor.casa.cgf.cx> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00296.txt.bz2 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