From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 27 15:30:53 2015 Received: (at submit) by debbugs.gnu.org; 27 Apr 2015 19:30:54 +0000 Received: from localhost ([127.0.0.1]:41547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ymojz-00053X-4b for submit@debbugs.gnu.org; Mon, 27 Apr 2015 15:30:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37241) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YmoLh-0004Pk-OV for submit@debbugs.gnu.org; Mon, 27 Apr 2015 15:05:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmoLb-0004QR-7V for submit@debbugs.gnu.org; Mon, 27 Apr 2015 15:05:40 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:38636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmoLb-0004QJ-4U for submit@debbugs.gnu.org; Mon, 27 Apr 2015 15:05:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmoLZ-0003gJ-OY for bug-grep@gnu.org; Mon, 27 Apr 2015 15:05:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmoLU-0004Nw-Ma for bug-grep@gnu.org; Mon, 27 Apr 2015 15:05:37 -0400 Received: from biz117.inmotionhosting.com ([74.124.210.92]:64125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmoLU-0004Nc-FA for bug-grep@gnu.org; Mon, 27 Apr 2015 15:05:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ayre.com; s=default; h=Content-Transfer-Encoding:Content-Type:Subject:To:MIME-Version:From:Date:Message-ID; bh=vS9NGcPMTAiF+dZ56wQOUngK0S0Sil/SB9+LZqfA5p4=; b=uMcbNhm8fn8CbTXUX7Gho3xSfS8qYciIbCIRWhhfYd4fMcZHQC4UVFCyYmTY/tHTSiTWe0JSH3RnJ3iYn7spUHA6A5DgVGyG/tGVLE/7IidRt6DEqgEEpeBP9owRu+ys58ESJNvCJenRFi3EeR2CEiahL8NrYDOdn+ViDxmlfBQ=; Received: from 23-24-137-117-static.hfc.comcastbusiness.net ([23.24.137.117]:2215 helo=[192.168.1.83]) by biz117.inmotionhosting.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.82) (envelope-from ) id 1YmoLO-0001VE-NP for bug-grep@gnu.org; Mon, 27 Apr 2015 12:05:27 -0700 Message-ID: <553E8867.3000608@ayre.com> Date: Mon, 27 Apr 2015 13:05:11 -0600 From: Clay Hansen User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: bug-grep@gnu.org Subject: grep pattern is forward slash + star Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - biz117.inmotionhosting.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - ayre.com X-Get-Message-Sender-Via: biz117.inmotionhosting.com: authenticated_id: clayh@ayre.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 27 Apr 2015 15:30:50 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) Dear Coders, if I echo 'a * z' | grep '/*' it succeeds and prints 'a * z'. Can this be right? echo 'a * z' | grep -F '/*' fails as expected. Tested in Salix on grep-2.14 and freshly compiled grep-2.21. Thanks, From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 27 16:53:12 2015 Received: (at control) by debbugs.gnu.org; 27 Apr 2015 20:53:12 +0000 Received: from localhost ([127.0.0.1]:41614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ymq1f-0001Yu-TL for submit@debbugs.gnu.org; Mon, 27 Apr 2015 16:53:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37559) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ymq1d-0001Ye-7b; Mon, 27 Apr 2015 16:53:09 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3RKr433015961 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 27 Apr 2015 16:53:04 -0400 Received: from [10.3.113.161] (ovpn-113-161.phx2.redhat.com [10.3.113.161]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3RKr3Ff014432; Mon, 27 Apr 2015 16:53:03 -0400 Message-ID: <553EA1AE.60604@redhat.com> Date: Mon, 27 Apr 2015 14:53:02 -0600 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Clay Hansen , 20443-done@debbugs.gnu.org Subject: Re: bug#20443: grep pattern is forward slash + star References: <553E8867.3000608@ayre.com> In-Reply-To: <553E8867.3000608@ayre.com> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="JKUTfFcEF7SUoqvKCiU05txWUECbd0v4f" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control Cc: GNU bug tracker automated control server X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JKUTfFcEF7SUoqvKCiU05txWUECbd0v4f Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable tag 20443 notabug thanks On 04/27/2015 01:05 PM, Clay Hansen wrote: > Dear Coders, >=20 > if I echo 'a * z' | grep '/*' it succeeds and prints 'a * z'. > Can this be right? Yes. The regular expression '/*' says to match 0-or-more instances of '/'. 'a * z' has zero instances of '/', so it matches and gets printed.= >=20 > echo 'a * z' | grep -F '/*' fails as expected. That's the literal pattern '/*', which does not appear in your input. Remember, to convert the literal pattern of '/*' under -F to a regular expression when not using -F, you must escape any characters that are otherwise special to regular expressions. Your second command would be equivalent to: echo 'a * z' | grep '/\*' where the '*' now matches a literal star rather than being the 0-or-more-operator. As such, this is not a bug, so I'm closing the report. However, feel free to ask further questions on the topic. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --JKUTfFcEF7SUoqvKCiU05txWUECbd0v4f Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVPqGuAAoJEKeha0olJ0NqEGsH/jGSxi/oTuNBxe1J7V7pfiQT Z1LdYkFGgAexg9HUwUfzM03OSXjc6FVlg2laGkHrCRx+G7em7p0qu/+Ol/XRBG07 FBSowgKz0xttM0zpFV7+aMGH91oX5cPzRIoQG92gl1eJaHFEN0NJcD030DNY04k6 l8DQu7KffY8nIwKRm58TJNfXckPzEgPf7GFzGDl4QXlgRDep2KtGfe2ax8rYCUBp ewITyNNHcR9nC4A560sB9/pe6q2R51DEOCfRtQIAQHJ8UHseex+Ee7ct8q47ncc/ wWRI/g5VlsFmSmj/fafRyIDcTBTB8POlyj5ZzjnFz2nutuKhpkqFcgXi6pwZpRk= =IjcN -----END PGP SIGNATURE----- --JKUTfFcEF7SUoqvKCiU05txWUECbd0v4f-- From unknown Thu Sep 11 14:10:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 26 May 2015 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator