From unknown Mon Aug 18 00:08:06 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#63819 <63819@debbugs.gnu.org> To: bug#63819 <63819@debbugs.gnu.org> Subject: Status: Gnu `grep '.*'` does not match an empty string. Reply-To: bug#63819 <63819@debbugs.gnu.org> Date: Mon, 18 Aug 2025 07:08:06 +0000 retitle 63819 Gnu `grep '.*'` does not match an empty string. reassign 63819 grep submitter 63819 "Bob Vincent Il (US)" severity 63819 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed May 31 19:01:27 2023 Received: (at submit) by debbugs.gnu.org; 31 May 2023 23:01:27 +0000 Received: from localhost ([127.0.0.1]:36504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4Uom-0001U5-Lm for submit@debbugs.gnu.org; Wed, 31 May 2023 19:01:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:51670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4PTG-0006pb-6Y for submit@debbugs.gnu.org; Wed, 31 May 2023 13:18:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4PTF-0007di-QT for bug-grep@gnu.org; Wed, 31 May 2023 13:18:49 -0400 Received: from mx08-00096706.pphosted.com ([91.207.212.192]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4PTA-0006vl-0w for bug-grep@gnu.org; Wed, 31 May 2023 13:18:49 -0400 Received: from pps.filterd (m0240461.ppops.net [127.0.0.1]) by mx07-00096706.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34VH3Xap027922 for ; Wed, 31 May 2023 17:18:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pwc.com; h=from : to : subject : date : message-id : content-type : mime-version; s=Gtwy2-05132021-ehtnJT9NLo6C; bh=FmU8OIelOJf4HvIESLXIF4oUVFlK3lug1tMuqedjVos=; b=fHmoU9ph7gkORKvilu8jxxAvQCZrssGLblGRkddc8Ttfu2HLLO5SEfgMx09TpbIlyapH SJ7nFC/kaROqc9I9J7xxKa5aOlgNR3eIjqGyhZwF+MsjLvkrzAdwdQLwUi8tXDM/qctp r1a+62v/mJQ39mPD/38/rRCMh8/Xlyp4VtsiQS9/9SG02aBJ5YIlnZ/eYjZZ8xNOVnuh mnauygLFm++oToO/4f7pqhVZy9Um9k3FKmU63Y7jFf7fgw6BV7jT96ZqQkVUP9LZpP70 YogOELIBox69D92GTikQ+vc4HrDU3PeUyNdsO21+Xboj69Ok/bMwM/OcWaC1aFS+4WBG Cg== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2174.outbound.protection.outlook.com [104.47.55.174]) by mx07-00096706.pphosted.com (PPS) with ESMTPS id 3qxaa6g724-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 31 May 2023 17:18:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XKuBxwh94bERpSh5YiWAl13EXxyXt/gSevLdRPeR1Mk2YIkE+co99DopEJumWGiCAwoDIjho0PLfNGM5FIDu21xOoZK0vWV7ltsSRYDKpcOCnq7S3tWtjBx4VD/N4/WhoTY2380pgzD4SPYmMceKIrMnNPKnqsXh7AGrXec3PQ/9WQYBUAJcX7r4g3WrjsMm+LVGsJ1gUZkJF7rZIg+iQznNQf5IYGzdSEhxatuj+7DxcYT8s2JiG5XjvWri7rPBnHRrXf0Ms/QIYtY0+ZvSD5HhGQnrNbim8xQPdcs9lZ1eRrGtQ+7JzCACMl/KfCqKab+LY7PfIAOM7NNX6oEt8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FmU8OIelOJf4HvIESLXIF4oUVFlK3lug1tMuqedjVos=; b=WzBJvToxXI8zB2aMMnFddOE9Bl73xuCu4foXf6N5nB5AWBbt9yuPHmngsYgNcPiAPL274OdWwaKqAplOrT4ATZOPiBHIs2FTYY98HoxKXCicAA/7IHsXPP1tZJ6j1mIaQHu/CWN5xkklqpprzT2sZf8hyEDlNjbELRbPgpOTkF5ny7Hgvefl3SlNkhAzqXmKY/a/B4RqfJalS+hHVKLeqvFyuCF/JvmPEv8quAGWzd29XVrfuwzY8QaHBUU1wc6wzxea+KqPeQ2VBnAt8zzirBLYOeXOVuGsds1zGVFOZLxdPcrit9Jy0i2coMz4vBpsJfg3i74NUFkWZB8dtqwUnA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=pwc.com; dmarc=pass action=none header.from=pwc.com; dkim=pass header.d=pwc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pwc.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FmU8OIelOJf4HvIESLXIF4oUVFlK3lug1tMuqedjVos=; b=PcuyHse9vt+INjmWVK8yCVzhUxkat0Cfljp1J38CxU0fnBGNF7C2oidRuewnDSdv5jbZY7bOTobfO3FvLaq73Zao37M2oda2nHhMwC5e8UIYvnUYlVIOzfI+SCMYz6kzAiSQSO6+L/0cQN1gLz6oasoULkkKQJyjBTZxu2uCecY= Received: from DM6PR19MB2812.namprd19.prod.outlook.com (2603:10b6:5:13b::20) by BL1PR19MB5939.namprd19.prod.outlook.com (2603:10b6:208:39a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.7; Wed, 31 May 2023 17:18:30 +0000 Received: from DM6PR19MB2812.namprd19.prod.outlook.com ([fe80::7443:6237:454c:2994]) by DM6PR19MB2812.namprd19.prod.outlook.com ([fe80::7443:6237:454c:2994%7]) with mapi id 15.20.6455.020; Wed, 31 May 2023 17:18:30 +0000 From: "Bob Vincent Il (US)" To: "bug-grep@gnu.org" Subject: Gnu `grep '.*'` does not match an empty string. Thread-Topic: Gnu `grep '.*'` does not match an empty string. Thread-Index: AQHZjbi4DE9jeS8Pw0O0P/walDRM2Q== Date: Wed, 31 May 2023 17:18:30 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR19MB2812:EE_|BL1PR19MB5939:EE_ x-ms-office365-filtering-correlation-id: deed971d-c063-4855-1b9a-08db61fb0e17 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Bm9DdFqIrO1ubH4+bZPxKtFGKxtXrX/VP5FRZo6FvYLphHN+BKAad8W2Qgvc2bYCaffVvTZNRoVzaLKMqISx2BFO26EN9ZchZNYiJWLBU6WgyYtS9HuhtyVZdMXx1yXXkhwlTFQ85JStE/KSkIosC4bNqJOHe9Byxpy/s/1SxlhqGSY4DN8cYCMA0F8gEzeEAqKxLMMl/ceNnbiEWUwNs8jT38F8LfI4oA5/xoJoYxqTFOBrmTOVyfqLoiwzWV6tInhsk5tQj98RoHnAElEJi3s92mm12EUFkftBzvwEzjNFUZSrsr996CMnp/eZyr5Z0er+hDIoimRb7QNVr0+9KGQqbgv/tgKuIF87h0BCo53PXeLW7vye7mmgKnmcwW+SBb2F9iX4BvhlTLQ4/DYUODunrKWKppm8FpFVd1sD1mxUKcYWtrOAc5hw+l5a0iyFlkyDdiv+fMUBMfJ1mYYrfMNXub14YLyT9U17cbO7V73ZaNo2GtijVVZyepKo8VRT8sc7CShdSV/pd7fgKGSHsdgPU7xGvrxcZ8bJnhh6BPkAnr2/yz+EsXNhj3xckrSZzMiPQhDCu0GqZOXTPcxP7FFV8YYM3Bkxq5bsoq0UvDRRkq0Yo3Roqg30rcS+CuSGReJzWJ1SHABCTvDjP8oZOSgp1GIHAceYTbe98/HUXnU= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR19MB2812.namprd19.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(451199021)(71200400001)(6486002)(478600001)(33656002)(40140700001)(186003)(6506007)(6512007)(9686003)(83380400001)(38070700005)(38100700002)(166002)(86362001)(82960400001)(122000001)(26005)(316002)(41300700001)(66446008)(66556008)(66946007)(76116006)(6916009)(66476007)(64756008)(91956017)(52536014)(19627405001)(8676002)(8936002)(2906002)(5660300002)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?gO6l7JdFj72sWHcMGvoEq30+YA6zcS+hqojiiSkE6aUxnvI9lLIpX3no?= =?Windows-1252?Q?/NTRA3scB8ZnxXqSF39KXYlYI1aap7uWqmFxoobhA1JMobH+LfZ2xIvH?= =?Windows-1252?Q?aCLzkT87uNtjDkinMqacBjh/uX5CodV1Mq8WRA0OkPpDN2lYXfDjMZ8p?= =?Windows-1252?Q?/gBnFEksy3dRH1eIfEOM7t+pPwUGBqbvs9svWf0XNIiMdhhqYRWOTpis?= =?Windows-1252?Q?mZF5aSL/2e64G4Fyr4uep/QHOdMZ+UpJEWD7FKiEJgLX0/fGhjbTO9Q5?= =?Windows-1252?Q?9afKW/aeffLm2sjeg6zU9T0IEbrRnMD524x0La/3KYAt6q0+jh2ZvF4T?= =?Windows-1252?Q?m9Qz3Dg6j3w725himmqg9q9FTZZftLngsSHQsLZhj8zx+pjDhm8PQ53p?= =?Windows-1252?Q?ituJnyMbrtK/u6yYumNg9c26SjlHtOKKg7o+lu5D7w8Vmx1jJ3gVwY9k?= =?Windows-1252?Q?PNdcr4f+WfCBWg/dUAWkAfrHVksysJx+XEJ8qqBf9LqE72Of0xkCW15o?= =?Windows-1252?Q?oSeDxU3ec1pGwpqEEmI4gX8KiZjsLXaWMV6Pe7lSHci7RY6M/W5Fok+P?= =?Windows-1252?Q?aO5IzhuN/TLy+7z7ktxDqG+Ks1jN/p5W3RGokDN3JlUif+H3yuEpIPVQ?= =?Windows-1252?Q?uvm7nPXwG1evshosf3hf/3CXZWvUXbFmwISGrG/lIu5n3Rn0ghaMnARx?= =?Windows-1252?Q?7FwAwc0L8G2FG6pp3xZpMm2VdLM578jbGGTKjsLAs93hkY4xLMbIypCG?= =?Windows-1252?Q?ecRt76o0WMteiD4c+v1Jj2RohQu3rHZqbvgFTSJ6oozocyRev6GMjGPc?= =?Windows-1252?Q?SLcYMUc/a83zOFaTNMtev/Z0DSzvtoomZCfzuePV7wuKF/DFWO8QZ6NK?= =?Windows-1252?Q?5gnMdQClv8TLWoQgqPcU9s0qvecGNs8S6ckrpFDpwN7SbpwnxuTpW+Hb?= =?Windows-1252?Q?ZEdBgbKS05L3Q3TD4SrUusZrguuR96i5KWIqbZlGQOq2Wt43Q8UuMMkD?= =?Windows-1252?Q?KP9XsrFnKx9GHzmbaSJFhoKsf1XNqrUAiEWylgt+uXe2Ivd6bEq/muXw?= =?Windows-1252?Q?120dUNVeMAZg8XnBbD/MssQCq8eAhGFkyp3Zh1MsX3cKu4AoYn3zVDBN?= =?Windows-1252?Q?OArgX2BynDiATnTkGymVr1nSM4A0VLO+n2TXoIld7+LqQZSB7i+BYoym?= =?Windows-1252?Q?b6UGWjVrQ5cn/XUFnEJHpaFnl3Gbq0s+dQfxS95KubO674fm5ZuvO2TO?= =?Windows-1252?Q?eVnER3J5y3NIjuFIiKaEZ9PlkmQg791/4J1WuDzUjdYnHYzVJ+mG3WVb?= =?Windows-1252?Q?sqf8nFitNql7QqwJTSVFFG0vCxBiSzVNG+bgWUSjvNuo5nNOcLtwoLMq?= =?Windows-1252?Q?SzDJpkmugyuOSpAsU5W4mT77Tst9CQAqIOa25syYpsOi6ByC+kJAoVEX?= =?Windows-1252?Q?DeCQPywUOdYyG4tjhsLiT/9lHAVwkLYDotYeP6dt3X3SFI8q0W90LlpJ?= =?Windows-1252?Q?tGw5NUmRrU0JBkF7A1UHDlw8k5x7SC3Uu29T4orb7zxroIWJRCOGjgvz?= =?Windows-1252?Q?WPYZj7IoGtCIijcYwg5wCWIW3BOMIYDbIaRr3MQT8gSnJvGRoEn+QIwp?= =?Windows-1252?Q?KIHyW+luXIRbb3pXF7xHgxCKA+EBt6dTIfZtUUNTXdPlpUPr9AVlaoi0?= =?Windows-1252?Q?5RTRBjoKRWn0aoGzE3n51QJZOXqk7H53pWa2727Ng8GB7K77Ed/rdQ?= =?Windows-1252?Q?=3D=3D?= Content-Type: multipart/alternative; boundary="_000_BN8PR19MB28038973B2BF7CC918216A5EEF409BN8PR19MB2803namp_" MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: pAo/MvzlioE4JDJJUUtja54WfxOFVSzMI/1AQPsioADWhFkltgZeQRJ8W5H0WDkBwBl+kWbgQj4Lpy+GzD23dhRZN4D3UsN1IvpluG8tmtl8IRtDbK/qoQwcM+1BZy9ES2pquL1qjpiX+6Ywrc/UCLj/T9E1fRepxTOCxoMQTR5u6OkJu+4PKZK+xqIwOylkKClFzQP34/PZaWCnkA4xrdhmukgv1Oab/NxnPQ/l+fNqa84mVk8oOPMFgDKvnVSqy2SsTM1WjPeQHt1wnogbpC8l2FvYqw9t1LJ6gYCIw/6zQIZkkLy3wi5+EFztMoFGLpne1B3Jkb2lQZvc+ZhpcwR1UVVpZGOTwIg++j0KSPXCK+2wXyVsGuVMCgW3XF7Bg6sIYo0wArspZIYPpiSGzL6oMfYAz93VXNM1WLJVewdNEbSVe1rqWh86UlSlbexjsW+n+B7qUofSwFm9MnvCzZaCDcujV69bwPOOxsww7YHzrK5Jtrv2/R4yKngBPmjH3DX01nUN88SGEa5zOk4OxAZ/43An9ZIKn5LYLpEB1AdhST6DVNF7oRJ09V5LnMxq5Cghc8jiMLQEm/z9aT773d6rAcbxwN0RKzsZQ6RTEaBFFFMBDMj0XM3+Zk49IC7i8k5vBnxgooapjmcrf2vaQnf4Vc8/774jtf8APbA2yGE1XJwLEdykVPPtA0FxZUfFEcMD8mJUz+yV2b9ZjD8hyS2KwniuKOaYSbdrL4fxPHZtSyPpXwp0TG0sa51jehTu X-OriginatorOrg: pwc.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR19MB2812.namprd19.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: deed971d-c063-4855-1b9a-08db61fb0e17 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 May 2023 17:18:30.3781 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 513294a0-3e20-41b2-a970-6d30bf1546fa X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 779KOQM9kMWGrW8pN3XClZ9TzJ4Q6RvKa8GMQXAFweh6LKmNUTSU7K1w9KW1Ag1lWNg8I096Ill4zjlImnKP6LZEIhH+RXtSugB9kyobNAY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR19MB5939 X-Proofpoint-ORIG-GUID: 7Ov-7QxUvQQFuwp8vzEtEKkSG2pVfTXI X-Proofpoint-GUID: 7Ov-7QxUvQQFuwp8vzEtEKkSG2pVfTXI X-Proofpoint-Processing-Postfiltering: True X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-31_12,2023-05-31_03,2023-05-22_02 Received-SPF: pass client-ip=91.207.212.192; envelope-from=robert.a.vincent.ii@pwc.com; helo=mx08-00096706.pphosted.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.163, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URI_NOVOWEL=0.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 31 May 2023 19:01:23 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.9 (-) --_000_BN8PR19MB28038973B2BF7CC918216A5EEF409BN8PR19MB2803namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable I discovered only today that the following commands all behave identically: * grep -q '.*' * grep -q '.\+' * grep -q . * grep -qE '.*' * grep -qE '.+' * grep -qE . Gnu grep documentation says: The period =91.=92 matches any single character. It is unspecified whether = =91.=92 matches an encoding error. and =91*=92 The preceding item is matched zero or more times. I would think that an empty string matches "zero or more of any single char= acter". Can anyone point out where the documentation says otherwise? Bob Vincent (US) PwC IT - NGC - PUPPET DEV OPS | Senio= r Manager Work: 906-984-3549 Mobile: 770-744-1792 PricewaterhouseCoopers LLP @workday @githu= b @ServiceNow ________________________________ The information transmitted, including any attachments, is intended only fo= r the person or entity to which it is addressed and may contain confidentia= l and/or privileged material. Any review, retransmission, dissemination or = other use of, or taking of any action in reliance upon, this information by= persons or entities other than the intended recipient is prohibited, and a= ll liability arising therefrom is disclaimed. If you received this in error= , please contact the sender and delete the material from any computer. In the event the content of this email includes Tax advice, the content of = this email is limited to the matters specifically addressed herein and is n= ot intended to address other potential tax consequences or the potential ap= plication of tax penalties to this or any other matter. PricewaterhouseCoopers LLP is a Delaware limited liability partnership. Thi= s communication may come from PricewaterhouseCoopers LLP or one of its subs= idiaries. ________________________________ --_000_BN8PR19MB28038973B2BF7CC918216A5EEF409BN8PR19MB2803namp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
I discovered only today that the following c= ommands all behave identically:
  • grep -q '.*'
  • grep -q '.\+'
  • grep -q .
  • grep -qE '.*'
  • grep -qE '.+'
  • grep -qE .
Gnu grep documentation says:

The period =91.=92 matches any single character. It is unspecified whether =91.and
=91*<= /span>=92<= /dt>

The preceding item is ma= tched zero or more times.


I would think that an empty string matches &= quot;zero or more of any single character".

Can anyone point out where the documentation= says otherwise?



The information transmitted, including any attachments, is intended only= for the person or entity to which it is addressed and may contain confiden= tial and/or privileged material. Any review, retransmission, dissemination = or other use of, or taking of any action in reliance upon, this information by persons or entities other tha= n the intended recipient is prohibited, and all liability arising therefrom= is disclaimed. If you received this in error, please contact the sender an= d delete the material from any computer.


In the event the content of this email includes Tax advice, the content = of this email is limited to the matters specifically addressed herein and i= s not intended to address other potential tax consequences or the potential= application of tax penalties to this or any other matter.


PricewaterhouseCoopers LLP is a Delaware limited liability partnership. = This communication may come from PricewaterhouseCoopers LLP or one of its s= ubsidiaries.



--_000_BN8PR19MB28038973B2BF7CC918216A5EEF409BN8PR19MB2803namp_-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 31 20:42:55 2023 Received: (at 63819) by debbugs.gnu.org; 1 Jun 2023 00:42:55 +0000 Received: from localhost ([127.0.0.1]:36543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4WP1-0004A2-FM for submit@debbugs.gnu.org; Wed, 31 May 2023 20:42:55 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:50880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4WOz-00049m-L7 for 63819@debbugs.gnu.org; Wed, 31 May 2023 20:42:54 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 571E73C02213D; Wed, 31 May 2023 17:42:48 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id W_uE8mTQkL5s; Wed, 31 May 2023 17:42:48 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 1F0263C09FA06; Wed, 31 May 2023 17:42:48 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 1F0263C09FA06 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1685580168; bh=VstBZEwT0pzt0888lInUBcLnuyNbSylhzz3JLl5FMOc=; h=Message-ID:Date:MIME-Version:To:From; b=S33IFyDWPsHumTZyzqRUhHn81OHputYDuZdSMEBkxYVHreSHOM/6Hfh+janTzNpjA 5w/X60VTGm0gryxdMvUVtDKw4b4NRkewIUJcSBRmofclnE/fmxgVT5/Rl9+hiLo8DK 0Y4dEzwSJBPER3LHMeV7XEg6PN/9wOqjUHpp+hI2s25lPCbhRfrt87K99UuRyvCGhF Ilhrd2Mandf78meYsTcu/hs3G3TGS+Kyw5pgtZ0UEhSrWgyZQEyi+nbEBQ9Ezjw6i5 rpToTRIzSDsmjodLoNuJe2BZwp4pTgntnS1GafJEkbXgoCUqf5OAt4EfJIs7fMt6EO GlrMPDHJTLCYg== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zBm8xLEkEUbO; Wed, 31 May 2023 17:42:48 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id F0DDA3C02213D; Wed, 31 May 2023 17:42:47 -0700 (PDT) Message-ID: <65bbc76f-cc20-7b78-8959-b24ccfb23596@cs.ucla.edu> Date: Wed, 31 May 2023 17:42:47 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: bug#63819: Gnu `grep '.*'` does not match an empty string. Content-Language: en-US To: "Bob Vincent Il (US)" References: From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 63819 Cc: 63819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -2.1 (--) On 2023-05-31 10:18, Bob Vincent Il (US) via Bug reports for GNU grep wrote: > I discovered only today that the following commands all behave identically: > > * grep -q '.*' > * grep -q '.\+' > * grep -q . > * grep -qE '.*' > * grep -qE '.+' > * grep -qE . No they don't. For example: $ echo '' | grep -q . ; echo $? 1 $ echo '' | grep -q '.*' ; echo $? 0 From debbugs-submit-bounces@debbugs.gnu.org Wed May 31 22:17:27 2023 Received: (at 63819) by debbugs.gnu.org; 1 Jun 2023 02:17:27 +0000 Received: from localhost ([127.0.0.1]:36586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4XsV-0006bK-0t for submit@debbugs.gnu.org; Wed, 31 May 2023 22:17:27 -0400 Received: from mx07-00096706.pphosted.com ([185.132.181.231]:53420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4XsR-0006bA-GR for 63819@debbugs.gnu.org; Wed, 31 May 2023 22:17:25 -0400 Received: from pps.filterd (m0240472.ppops.net [127.0.0.1]) by mx07-00096706.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34VMVaNE010085; Thu, 1 Jun 2023 02:17:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pwc.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=Gtwy2-05132021-ehtnJT9NLo6C; bh=Qz1pbMS3eUy0V6GF6DE2RL4DIzfOq/fDT2CaC+89NXY=; b=ADFi3QrJF0ZlgosbEXTVByVuJS5cYOIPT1TALrOKolRLzgzwXf7u/3T0nMYsIaA6Tq4B Vfcqr84fc5VTQJ776/Q7rGqFyArkvkOW5FkoTBAxXv4bmJOqxpTFGGYgwaUy6lzJJdcD YUvDU0CUV/rjGxEsNHeYcP+Lq+WBD7eILcOrcvUvo4CLsc/VhpsSPC4cR49GLfdFigVR AEkzPKvlbcAsM/1+gp8BvyZoaK/0dEEGF2NBpZ3q9XxBJGzCBOPoWgT8vijOC+FWvg4F Kwi1qJQ46u8VE8dBqi3owY1kd9j2WsVqnnz1TkGqdW78SOl/LY8fuI0WQ996UluGpsJz lA== Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2104.outbound.protection.outlook.com [104.47.55.104]) by mx07-00096706.pphosted.com (PPS) with ESMTPS id 3qxdtyafw6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 01 Jun 2023 02:17:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wj9dkQZ3l32paG6eDL+Cpwnka1OqBUrNJ2VTz5JedsJAkbK68OxHbdQKEfwEKHrV3J4rzNCdWGaWMmaHi44sujuAKgHuVRYBptGl7RWG1Xk/VbyDo6uYDDMwPdnVaEL1C/TXvLNJNLVyVR2I1Eks4HX+w9fnqwNaAshKXEDxlDM6ANh37hZxzHf+dVAELAF1Y44XaN5b1B9l6ybV2mArTRIpVGpl0Sj2tCRuFE9WQY9uHQzDPWUYxFpHLuoBI2hQrPP3JD4rLK7BIWVoSya2uDIuxiDtd+5p3biMDMx4OXBSuHPFERoBsc/P4t08Bos/MuKe2479kvtpLgiY5zoP+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Qz1pbMS3eUy0V6GF6DE2RL4DIzfOq/fDT2CaC+89NXY=; b=MYkRWRKWdJWthzxG8duk3bq1qyPyY5IQ0DdZojRa+1nwvZDXEgihDtsZDLPZYHHqb1VFblfpxoB2qLpYnIAmYVS+dzlqJ9wCPD42KWdZVUOCkdQVYCvkbK4rE0pOh017BmNwRlkeapy4/5KwIj7dTzHtg7aAxAF0Cwk0PKTsfiM1WG4YXGwDF7yxMZgnYn+yKFftoK3qjdfGG5bTTfK8hXQLjk6Oe51g1un0gkAT68KokzivuapDWzrkPPUndNWjzWeb7GDteVN7NBwH9p5eGKlLqcdmHOfpFKjkNE/fbpIOByZGAWPt3xqGE1eZPwuRaqkiW8feSkb1WSNPT1K4Aw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=pwc.com; dmarc=pass action=none header.from=pwc.com; dkim=pass header.d=pwc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pwc.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qz1pbMS3eUy0V6GF6DE2RL4DIzfOq/fDT2CaC+89NXY=; b=Q3DCefwi1KOUUn51yZkTbUnxB7quGc4FIFv+gvnt+a4bzd0G95VOjpBtfls7fKiU/9p3NzNb2rGishYb29ZdRb93CtwFzyWG9G9biE2B3fS8Nm7j/QMEix3g6N+TEs92TlVAe1wo3tBr0F+I1Fs0WLxe1Q+vcf2M6ZpIw/w9VNk= Received: from DM6PR19MB2812.namprd19.prod.outlook.com (2603:10b6:5:13b::20) by PH7PR19MB5990.namprd19.prod.outlook.com (2603:10b6:510:1dd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.21; Thu, 1 Jun 2023 02:17:08 +0000 Received: from DM6PR19MB2812.namprd19.prod.outlook.com ([fe80::7443:6237:454c:2994]) by DM6PR19MB2812.namprd19.prod.outlook.com ([fe80::7443:6237:454c:2994%7]) with mapi id 15.20.6455.020; Thu, 1 Jun 2023 02:17:07 +0000 From: "Bob Vincent Il (US)" To: Paul Eggert Subject: Re: bug#63819: Gnu `grep '.*'` does not match an empty string. Thread-Topic: bug#63819: Gnu `grep '.*'` does not match an empty string. Thread-Index: AQHZjbi4DE9jeS8Pw0O0P/walDRM2a91KIaAgAAZ2TE= Date: Thu, 1 Jun 2023 02:17:07 +0000 Message-ID: References: <65bbc76f-cc20-7b78-8959-b24ccfb23596@cs.ucla.edu> In-Reply-To: <65bbc76f-cc20-7b78-8959-b24ccfb23596@cs.ucla.edu> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR19MB2812:EE_|PH7PR19MB5990:EE_ x-ms-office365-filtering-correlation-id: 0ab275ab-941c-4857-bb50-08db62464c4e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JVrhFRddVhxw8QAbZUcp+vn69OssY0IzhVqMeF8EhdCo/YD2S4s05e6husxFu3LuURiZdGrUAwRIsS7ViZNefHXH5dyWEfJZbwtqaCqq+WgL4hzehBy2JDoIr4z83OZ1NNNIEI6juh3bIyA26HY8w5PnI+pYTM3XJHXzei6t5kDOQQFxl+Fy+uZkspaFzk0YurT9rfR8cuayO5uuHHbOnneX/87NeUpX/CXyb1gvYu9ftS/GmJSrdUKF2QIajKqH+eXp+UjGlnOKMgYoaTlI5qcG4sOdgctNmAZ4lqJry2djjmRctiC+hAxAp/CWIo0OxpGmcZwCLNN9b+ikFedzLvXPAOEB5rRHT3yE9V4e2QMROje57d38MpwKgNGUvqnvABO8hbEtIFDWJUzQk8TyRjzWqlRrSOkXzMmDW6/Cwy5o5gtFu73E2zru426AAe8miGe+eH0GFn2pQlB3Wp1qjyBlbFM7AJf5SrXvYTDxusWl1K4491jBLIUqk7Tqx72N5yn9ZxGn5H6jWvvMWt3mor3cR61uG1LwgVgijOG62h/i77LSQdwDVd2I/7+4pK1LtEB/I8ck34vO5yOoiqXcKWNshczG542HYeooUXNp/vU9+WWCdH9KuZTlkJ4UqnRzoDA39BaPZ5DqWTnxglWGjg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR19MB2812.namprd19.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(136003)(396003)(366004)(346002)(39860400002)(451199021)(6506007)(9686003)(186003)(53546011)(2906002)(26005)(478600001)(83380400001)(86362001)(7696005)(8936002)(8676002)(82960400001)(41300700001)(122000001)(38100700002)(66946007)(40140700001)(55016003)(66476007)(76116006)(316002)(5660300002)(64756008)(33656002)(71200400001)(66446008)(38070700005)(66556008)(91956017)(6916009)(52536014)(4326008)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?cDLUc5TdZsUYLLw6CEMAIvIB6r73Vs3qu5WEalVfvHL14LtQIu5jmC82JkiP?= =?us-ascii?Q?SN8eZgvP83mX55870uMuZHpVTPzZt3u4Vl4J93KHEIlfO8VllN2g91uv0SZG?= =?us-ascii?Q?tfrGCSmy5QWyPGZYPiMn216DnSxbNGzQJgRoQ8YzU5lPX/JjLwBN3SDs8Nbn?= =?us-ascii?Q?b7Zm5EONriJq3Aki2nBv5k2b5KEYk1B7MbUSTIAbFxIDtpRAIJUNlSVarHtD?= =?us-ascii?Q?FG7mH3nGe6XVBFo8uIdnb4Tx9fcHG5VOLdrc5NpfHAfRrRDap8LvIv6b0V+O?= =?us-ascii?Q?0m0do4nk/7WOueRnrPP0RODwpCQN0FfziQ4wH7zy0yr5asq33BHs+8/vO25Q?= =?us-ascii?Q?yFUynSG41IRqHu/suwXksgIZioBW9jvYVOrYlIdQ5KbsHiCmsr9EjdphHR47?= =?us-ascii?Q?UgMKjAVLJI7NCXdXKbrGgcNhN0vA6kRMbdnLtOh85fQk0bo/GkRwxLelMvwA?= =?us-ascii?Q?LE18LjpDsHp4+8WeYNfzdV9NEATfVldCeWQyEpbXMy05U/cKpsooSrLjrDRD?= =?us-ascii?Q?KOKvktnsBBoV8e7KXJ6fZF91hGCcKY8aTqhi0hnaCxd6C3kN0osQ/X4THM0S?= =?us-ascii?Q?OKZ28IY4To2CG47mSiPhCokMnnet5UcLsF35Mxk3xdssHSRZUPl/vRZzKzo4?= =?us-ascii?Q?Flb/qc350wH4OySif3wMHVEKWk76+n2OhP/IbXQIljqK/a8encSTi3eMsvl0?= =?us-ascii?Q?CF4DlN4rU2OmsEu5rn4Ohj6BLy46X59OJQF1+rsw5YZyyW8X1z5XXt3pbPH+?= =?us-ascii?Q?rZ9wgZlBreBmFUXctJvqUy8vNj8PJ88wojPNZh9yg5GJ+2Yy1XYhWHCZBKV7?= =?us-ascii?Q?2Rwe0C4uNtr/nCRYbMSy5VK8nqBbvBDfOK/H2NYD2lDXnk3zP2QTaj09fQ7n?= =?us-ascii?Q?dBNSzHTMh92lP/B1GbL+1UoY+EjzgQQ/wD2LZsMm8Eq0CQcuPeiz45sLASvp?= =?us-ascii?Q?waHOXMtVfkKtz+1SrqpLLTU9eRnczTO2Mw7SaWcdwdfDKbsl4BZYf0UjXpKo?= =?us-ascii?Q?Ronica/X8/C0ewYo2ct4EDswE+imMnF/a75Qn0TUM0vs4rKe4HyUmfVenqXy?= =?us-ascii?Q?UpVPbZorKpQgYrSl/saCzy10y1+OMYKbOYocrllx8RRiW+C8HbbGLhsvV1/A?= =?us-ascii?Q?8RBWHG7kuCfCX9LbXv7lx5jHK0RzeRdnFc6zXsa+OKKzMSpAd0Z4fVdnAR+h?= =?us-ascii?Q?hF4hZ1wPEgIuKdZ+Zrd8HZggOj8uLTNjDk/stGFLEiwshgErQAfeOdPLORsK?= =?us-ascii?Q?NW1Sa7bFIFAiT+Xa+Hm2mOQb374Xnlylc2eHGdxt6cWDhQhfXpVgR3Wkbnhz?= =?us-ascii?Q?aQ9QF5KRCffTtd2pXqL92zqeH7U45m2ys5BCsc6Q64zqrWCxkU8Kl9nn5JjF?= =?us-ascii?Q?9kMVbMnz1JxuBARbFL7Z1S3eph4GM4TFdei46UpAjfiDoTqfeQ2798GV0ZRU?= =?us-ascii?Q?Q/fvIlErre3seVTdTIgbzUMVApxr2NEilPe66AvpyYwOsbxV+85W1uecN6qS?= =?us-ascii?Q?T2yr2p3nUUofaqRfv8I3hZDnuWZAdNAL1ZcvUO9Cn9lVquTO6Nr5guCtM0Xm?= =?us-ascii?Q?Ws4RkufZ4AEZ+76l7xe38SJy1zP+KmuD4JFS/Vhaw7QRNlPX7q/VZAvvCe7L?= =?us-ascii?Q?8A=3D=3D?= Content-Type: multipart/alternative; boundary="_000_DM6PR19MB281215FDCF6E67868CB8AF25EF499DM6PR19MB2812namp_" MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 4txeeb9wqtR6Q7dl8ApHOtH0VmDDHCGUfK3sXIp7VbIUTIPfxYSXHMET1FOYolDVrclqLnTv3UUwjpPNnFt7RmD1PWANU95hDskdh36AJ69EWKEggGznBI4xAAlPDkur3ujIxOvSBiC2M7AH8kNi/C+hKdBeF7S2JDT0i1rLIOcRxMwT1v7I4ULWt6byz6CXqs35W2ILbGdAif65z1TaZTwQZY6P0nhVmlF8EkpmemBJByYyHuVKv+dXCMsEucvHCElcRO9ndm4nS21aY6A7+eH/HdmsszpCDI/RYjDRSo2yjb3WogRQiN1jzvbMqeAK/TSVpQw581aSLx3tc+mwAla8gPAWNmmb4qfF8NiJRzJZ0ulhMJ+MsQlhoyUxqgo13qA2DaK/sN1j4IPJxIHu6PSbRl1qhh+w+LOdDRYHdT9lIjfNz5effspgtDjnP0e7G5dpfiTCOfFVGwz9pu4UTkin+x/rlcfWnKbHLi/T9i6bjXnaXmAo5H5YveHE7N5W8hGvM+YFmePbQp8yV0MfO7+e2qjummHDSPHyY/aUH8ZVX3Ruoh4HbwDlYnf0HKS8rSJdtPw1y8ezrjTKaosgcro6TGEvSZeVpxe8xbmDmSmAhzkui0IWK6Bb/1xTupBVHeksOX6YwnfQO5x2IF10ka9u5uW/OYdewAQa6znvj+cII+QVIVPygHY3+9/aIjhspzx/kD6laWvoElueehKzP8awB9cd9xP+/yufeXEvSBgsbc3xog47Z1AUdIrf5wkFjmjJcYHT9aU6E2wgcmkT145Li97tRkMz/bZl9Sew+04= X-OriginatorOrg: pwc.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR19MB2812.namprd19.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ab275ab-941c-4857-bb50-08db62464c4e X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jun 2023 02:17:07.0266 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 513294a0-3e20-41b2-a970-6d30bf1546fa X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4DW9VcGuLGAeh/Ix88CgtKd6AP3CWyn0v2fiAj7VLuz/AAx5VBp49cx6gmmztab3mjpBwo1V3BNZbqM9qWJbxv9NZsJLOs13Jfa4iULI1gY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR19MB5990 X-Proofpoint-ORIG-GUID: ZE9kK_M4QpSM1YS2uXCzu4GBX0x7--Eo X-Proofpoint-GUID: ZE9kK_M4QpSM1YS2uXCzu4GBX0x7--Eo X-Proofpoint-Processing-Postfiltering: True X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-31_18,2023-05-31_03,2023-05-22_02 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 63819 Cc: "63819@debbugs.gnu.org" <63819@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) --_000_DM6PR19MB281215FDCF6E67868CB8AF25EF499DM6PR19MB2812namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Okay, but `echo ''` does not output an empty string. It outputs a line feed= character. Bob Vincent (US-TSO) PwC IT - NGC - PUPPET DEV OPS | Senior Manager Work: 906-984-3549 Mobile: 770-744-1792 PricewaterhouseCoopers LLP ________________________________ From: Paul Eggert Sent: Wednesday, May 31, 2023 8:42:47 PM To: Bob Vincent Il (US) Cc: 63819@debbugs.gnu.org <63819@debbugs.gnu.org> Subject: Re: bug#63819: Gnu `grep '.*'` does not match an empty string. On 2023-05-31 10:18, Bob Vincent Il (US) via Bug reports for GNU grep wrote= : > I discovered only today that the following commands all behave identicall= y: > > * grep -q '.*' > * grep -q '.\+' > * grep -q . > * grep -qE '.*' > * grep -qE '.+' > * grep -qE . No they don't. For example: $ echo '' | grep -q . ; echo $? 1 $ echo '' | grep -q '.*' ; echo $? 0 ________________________________ The information transmitted, including any attachments, is intended only fo= r the person or entity to which it is addressed and may contain confidentia= l and/or privileged material. Any review, retransmission, dissemination or = other use of, or taking of any action in reliance upon, this information by= persons or entities other than the intended recipient is prohibited, and a= ll liability arising therefrom is disclaimed. If you received this in error= , please contact the sender and delete the material from any computer. In the event the content of this email includes Tax advice, the content of = this email is limited to the matters specifically addressed herein and is n= ot intended to address other potential tax consequences or the potential ap= plication of tax penalties to this or any other matter. PricewaterhouseCoopers LLP is a Delaware limited liability partnership. Thi= s communication may come from PricewaterhouseCoopers LLP or one of its subs= idiaries. ________________________________ --_000_DM6PR19MB281215FDCF6E67868CB8AF25EF499DM6PR19MB2812namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Okay, but `echo ''` does not output an empty s= tring. It outputs a line feed character.


Bob Vincent (US-TSO) 

PwC IT - NGC - PUPPET DEV OPS | Senior Manager
Work: 906-984-3549
Mobile: 770-744-1792
PricewaterhouseCoopers LLP

From: Paul Eggert <egger= t@cs.ucla.edu>
Sent: Wednesday, May 31, 2023 8:42:47 PM
To: Bob Vincent Il (US) <robert.a.vincent.ii@pwc.com>
Cc: 63819@debbugs.gnu.org <63819@debbugs.gnu.org>
Subject: Re: bug#63819: Gnu `grep '.*'` does not match an empty stri= ng.
 
On 2023-05-31 10:18, Bob Vincent Il (US) via Bug r= eports for GNU grep wrote:
> I discovered only today that the following commands all behave identic= ally:
>
>    *   grep -q '.*'
>    *   grep -q '.\+'
>    *   grep -q .
>    *   grep -qE '.*'
>    *   grep -qE '.+'
>    *   grep -qE .

No they don't. For example:

$ echo '' | grep -q . ; echo $?
1
$ echo '' | grep -q '.*' ; echo $?
0



The information transmitted, including any attachments, is intended only= for the person or entity to which it is addressed and may contain confiden= tial and/or privileged material. Any review, retransmission, dissemination = or other use of, or taking of any action in reliance upon, this information by persons or entities other tha= n the intended recipient is prohibited, and all liability arising therefrom= is disclaimed. If you received this in error, please contact the sender an= d delete the material from any computer.


In the event the content of this email includes Tax advice, the content = of this email is limited to the matters specifically addressed herein and i= s not intended to address other potential tax consequences or the potential= application of tax penalties to this or any other matter.


PricewaterhouseCoopers LLP is a Delaware limited liability partnership. = This communication may come from PricewaterhouseCoopers LLP or one of its s= ubsidiaries.



--_000_DM6PR19MB281215FDCF6E67868CB8AF25EF499DM6PR19MB2812namp_-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 31 23:15:42 2023 Received: (at 63819-done) by debbugs.gnu.org; 1 Jun 2023 03:15:42 +0000 Received: from localhost ([127.0.0.1]:36602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4Yms-00085h-5v for submit@debbugs.gnu.org; Wed, 31 May 2023 23:15:42 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:57552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q4Ymn-00085N-FF for 63819-done@debbugs.gnu.org; Wed, 31 May 2023 23:15:40 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 5CE4A3C02213D; Wed, 31 May 2023 20:15:31 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id pjA4IKcR_PCL; Wed, 31 May 2023 20:15:31 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id F03073C09FA06; Wed, 31 May 2023 20:15:30 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu F03073C09FA06 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1685589331; bh=oZUANNtgh1isX8G71F2VbGGZ2f+pZV4Ni0zE9tOVY3Q=; h=Message-ID:Date:MIME-Version:To:From; b=MFqZajc1xQZCrRTOx8YixBWSDeqJER/y0DZiuGjk03GuY/448ZkhAxGHYP5dvbX8u XRhjyltsbc8rruz4NFHSNru6NFsgZ7GdhVlMLIgB5HNlHnzCBiT6FwZamf/57p01PC mh3o9wNXGMj78vCR9MfeLUAqYmXoUPKoz8hGDJJiLsMbUqLZzf1ylXkfcGLSN5qNLr Q8PFWJjWGqL8d/QpxlR9dOCypHL/Xorf2sYgEavh9A3sPm4n/sB+H8eauJX8ndDsf2 MiQubluKvo9ZViZM05MP82r+blAP5U/WwATSc41WfXXZzKap3rtedm1hTfQ3XEY9XK U3znDlzRyF/Sg== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id vrSRI30rZ2oD; Wed, 31 May 2023 20:15:30 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id CCF0A3C02213D; Wed, 31 May 2023 20:15:30 -0700 (PDT) Message-ID: <9f737863-fbad-b673-930d-e5ccca682266@cs.ucla.edu> Date: Wed, 31 May 2023 20:15:30 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: bug#63819: Gnu `grep '.*'` does not match an empty string. Content-Language: en-US To: "Bob Vincent Il (US)" References: <65bbc76f-cc20-7b78-8959-b24ccfb23596@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 63819-done Cc: 63819-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -2.1 (--) On 2023-05-31 19:17, Bob Vincent Il (US) wrote: > Okay, but `echo ''` does not output an empty string. It outputs a line feed character. The line feed is not considered. Grep looks only for matches of "any part of the line excluding the terminating " . Closing the bug report as it appears to be due to a misunderstanding of how 'grep' works. From unknown Mon Aug 18 00:08:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 29 Jun 2023 11:24:06 +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