Received: (at 79550-done) by debbugs.gnu.org; 3 Oct 2025 18:57:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 03 14:57:19 2025
Received: from localhost ([127.0.0.1]:45915 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1v4kxy-0006fN-Vw
for submit <at> debbugs.gnu.org; Fri, 03 Oct 2025 14:57:19 -0400
Received: from sonic301-22.consmr.mail.gq1.yahoo.com ([98.137.64.148]:37070)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.84_2) (envelope-from <dgpickett@HIDDEN>) id 1v4kxs-0006f2-0Z
for 79550-done <at> debbugs.gnu.org; Fri, 03 Oct 2025 14:57:15 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
t=1759517822; bh=3wVSEsfkV+wjxLXHeXRBW25R0/yuVW+RQewGX0kQI3A=;
h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To;
b=CIVv+FWXcbUYpeW52A1g8KsUyn8Y92h/Jut6pV8fQiU97mMRiBjOy2r1+B6/dSg+TwhSPW9ZJqx1kJVtC6alYKNp68S//QNwZsLEL7vsMdNLTNcP6+TnZpznLSwqmfAOr+4oaO+t1ZzRbnHx4moVJUvuGEbER6TzIyWqIMepBvGdvBIen0y9kvfwu0lIwKsiLgjENDguh3HzASURW3mdxH9SfosehwPiojWTWAqdAysHvfODgCaEf9EvnoD2RQJOEp6vEKn2jXYa2R+qaLxiIUYQVETHKa6XmnsEFmMMt5tdpsoxOhYKsO5lSlW+ac1BfVizwaGeX4T7VSu3YUPYow==
X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048;
t=1759517822; bh=DkvsgdlIagHQDZvi4X7qkDNGKBSwFeJnyW2vjzl4AO/=;
h=X-Sonic-M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9BpMTgnrpRG1ECk6QSNZDdt8ys6YCGJVeqYHJz41XIX0vy_FV.WiVCDN_fGpA
iVwiMRj.gGgiZ0h4Z_1fOIa2cn2W3BC8CQtarSDjaT56dmFOQ8WcBn5CYtnTn_ym.u1zVBCkmGjI
3c_IgTLaB8HxjL1pIFb9nEWk7ufiUJr80vJh1amXVFTWMnIwFN1EGxJYLObIyWhnPMxX7qBE3k_U
1afWY3dUNfI7uyj79ZhWeyYVAhglvj5AxQs6CmmxSwArqUiLyXaDt.9RV4bTh1W_3jwrNKOsfPqv
ra_rhjNkHGFAJcXshLtUe5bZ_yGtdfyhC8m0FNrQfZF_OF.SKTPrq_WhAxgUEc3Bw3BMOIeFa.fu
YqiA_0DN19H8uGqxqfYOBwVLKkGkw8ekUOEUkh3eCfjox93g3cgXmJnRkynHSBoax_2CfDT1JuTH
ow4YBtW0vgdChwMNlQt7IGQfskbXwlPfSaFaxdboR5BT6RAzpdbJR3g82wc4sIdDI0cclGPWn006
uPAjj5SL579a6GFZ.ggIao7bQjSNp8xsR6CL2ddozVpEmjKPA.yAhjFpT8tkJPIt_LiY4S4UYRqw
-
X-Sonic-MF: <dgpickett@HIDDEN>
X-Sonic-ID: 8a3395e7-75c2-46fa-ab49-95d33aa47f56
Received: from sonic.gate.mail.ne1.yahoo.com by
sonic301.consmr.mail.gq1.yahoo.com with HTTP; Fri, 3 Oct 2025 18:57:02 +0000
Date: Fri, 3 Oct 2025 18:57:00 +0000 (UTC)
From: "David G. Pickett" <dgpickett@HIDDEN>
To: Bob Peraino <peraino@HIDDEN>, Paul Eggert <eggert@HIDDEN>
Message-ID: <1072011771.3082065.1759517820931@HIDDEN>
In-Reply-To: <baa9ca18-2440-4067-80e8-25fa08269085@HIDDEN>
References: <IA0PR05MB100937FA02EFB816B6768A343B1E6A@HIDDEN>
<baa9ca18-2440-4067-80e8-25fa08269085@HIDDEN>
Subject: Re: bug#79550: Grammar bug in grep
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_3082064_244026929.1759517820930"
X-Mailer: WebService/1.1.24485 AolMailNorrin
Content-Length: 6406
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79550-done
Cc: "79550-done <at> debbugs.gnu.org" <79550-done <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
------=_Part_3082064_244026929.1759517820930
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
What's the problem?=C2=A0 On wsl2 Ubuntu egrep, presumably from open sourc=
e, says:
dgp:~$ egrep '^1[2,3]2$' <<!1221321213232233!122132dgp:~$
On Wednesday, October 1, 2025 at 03:49:59 PM EDT, Paul Eggert <eggert@c=
s.ucla.edu> wrote: =20
The behavior you describe is documented and is not a bug; see:
https://www.gnu.org/software/grep/manual/html_node/Problematic-Expressions.=
html
and look for "In an extended regular expression, unescaped =E2=80=98{=E2=80=
=99 that does=20
not begin a valid interval expression."
Here are some more details about this portability issue.
On 2025-10-01 06:35, Bob Peraino wrote:
> ^1{2,3]2$
Because this ERE has an unmatched brace, POSIX says that grep produces=20
undefined results for it; see=20
<https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap09.html#t=
ag_09_04_03>,=20
which talks about what happens "If a <left-brace> is not part of a valid=20
interval expression".
> The Mac version of grep (AT&T origin) properly flags this:
>=20
>=C2=A0 % egrep '^1{2,3]2$'
> egrep: invalid repetition count(s)
Although the macOS behavior conforms to POSIX, I don't think it is AT&T=20
origin. Traditional egrep behaves like GNU grep -E. You can see this,=20
for example, in Solaris 10 egrep, which is closer to the AT&T tradition=20
than macOS egrep is. The traditional behavior also conforms to POSIX=20
since POSIX says grep can do whatever it likes.
Traditional egrep and GNU grep -E are more likely to do the intended=20
thing when a user mistakenly thinks that '{' is an ordinary character.=20
macOS egrep diagnoses this use of an unportable ERE that could well be a=20
typo. Neither approach strictly dominates the other.
=20
------=_Part_3082064_244026929.1759517820930
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html><head></head><body><div class=3D"ydpb3b70f34yahoo-style-wrap" style=
=3D"font-family:Verdana, Arial, Helvetica, sans-serif;font-size:16px;"><div=
></div>
<div dir=3D"ltr" data-setdir=3D"false">What's the problem? On=
wsl2 Ubuntu egrep, presumably from open source, says:</div><div dir=3D"ltr=
" data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false"><d=
iv><div>dgp:~</div><div>$ egrep '^1[2,3]2$' <<!</div><div>122</div><d=
iv>132</div><div>12</div><div>13</div><div>23</div><div>22</div><div>33</di=
v><div>!</div><div>122</div><div>132</div><div>dgp:~</div><div>$</div></div=
><br></div><div><br></div>
=20
</div><div id=3D"ydp7de6baccyahoo_quoted_9686516181" class=3D"ydp7d=
e6baccyahoo_quoted"><div class=3D"ydp7de6baccyahoo-style-wrap" style=3D"fon=
t-family:Verdana, Arial, Helvetica, sans-serif;font-size:16px;">
<div style=3D"font-family:'Helvetica Neue', Helvetica, Arial, s=
ans-serif;font-size:13px;color:#26282a;">
=20
<div class=3D"ydp7de6baccquoted-text-header">
On Wednesday, October 1, 2025 at 03:49:59 PM EDT, P=
aul Eggert <eggert@HIDDEN> wrote:
</div>
</div><div style=3D"font-family:'Helvetica Neue', Helvetica=
, Arial, sans-serif;font-size:13px;color:#26282a;border-left: 1px solid #cc=
c;padding-left: 8px;margin: 0px 0px 0px 8px" class=3D"ydp7de6baccinline_rep=
ly_quote_container" data-split-quote-node=3D"true">
<div><br></div><div><br></div>
<div><div dir=3D"ltr">The behavior you describe is document=
ed and is not a bug; see:<br clear=3D"none"><br clear=3D"none"><a shape=3D"=
rect" href=3D"https://www.gnu.org/software/grep/manual/html_node/Problemati=
c-Expressions.html" rel=3D"nofollow" target=3D"_blank" fg_scanned=3D"1">htt=
ps://www.gnu.org/software/grep/manual/html_node/Problematic-Expressions.htm=
l</a><br clear=3D"none"><br clear=3D"none">and look for "In an extended reg=
ular expression, unescaped =E2=80=98{=E2=80=99 that does <br clear=3D"none"=
>not begin a valid interval expression."<br clear=3D"none"><br clear=3D"non=
e">Here are some more details about this portability issue.<br clear=3D"non=
e"><br clear=3D"none">On 2025-10-01 06:35, Bob Peraino wrote:<br clear=3D"n=
one"><br clear=3D"none">> ^1{2,3]2$<br clear=3D"none"><br clear=3D"none"=
>Because this ERE has an unmatched brace, POSIX says that grep produces <br=
clear=3D"none">undefined results for it; see <br clear=3D"none"><<a sha=
pe=3D"rect" href=3D"https://pubs.opengroup.org/onlinepubs/9799919799/basede=
fs/V1_chap09.html#tag_09_04_03" rel=3D"nofollow" target=3D"_blank" fg_scann=
ed=3D"1">https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap0=
9.html#tag_09_04_03</a>>, <br clear=3D"none">which talks about what happ=
ens "If a <left-brace> is not part of a valid <br clear=3D"none">inte=
rval expression".<div class=3D"ydp7de6baccyqt0839603525" id=3D"ydp7de6baccy=
qtfd58342"><br clear=3D"none"><br clear=3D"none">> The Mac version of gr=
ep (AT&T origin) properly flags this:<br clear=3D"none">> <br clear=
=3D"none">> % egrep '^1{2,3]2$'<br clear=3D"none">> egrep: inv=
alid repetition count(s)</div><br clear=3D"none"><br clear=3D"none">Althoug=
h the macOS behavior conforms to POSIX, I don't think it is AT&T <br cl=
ear=3D"none">origin. Traditional egrep behaves like GNU grep -E. You can se=
e this, <br clear=3D"none">for example, in Solaris 10 egrep, which is close=
r to the AT&T tradition <br clear=3D"none">than macOS egrep is. The tra=
ditional behavior also conforms to POSIX <br clear=3D"none">since POSIX say=
s grep can do whatever it likes.<br clear=3D"none"><br clear=3D"none">Tradi=
tional egrep and GNU grep -E are more likely to do the intended <br clear=
=3D"none">thing when a user mistakenly thinks that '{' is an ordinary chara=
cter. <br clear=3D"none">macOS egrep diagnoses this use of an unportable ER=
E that could well be a <br clear=3D"none">typo. Neither approach strictly d=
ominates the other.<div class=3D"ydp7de6baccyqt0839603525" id=3D"ydp7de6bac=
cyqtfd08612"><br clear=3D"none"><br clear=3D"none"><br clear=3D"none"><br c=
lear=3D"none"><br clear=3D"none"><br clear=3D"none"><br clear=3D"none"></di=
v></div></div>
</div>
</div></div></body></html>
------=_Part_3082064_244026929.1759517820930--
bug-grep@HIDDEN:bug#79550; Package grep.
Full text available.
Received: (at 79550) by debbugs.gnu.org; 1 Oct 2025 20:49:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 01 16:49:01 2025
Received: from localhost ([127.0.0.1]:37405 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1v43kz-0003WX-21
for submit <at> debbugs.gnu.org; Wed, 01 Oct 2025 16:49:01 -0400
Received: from mail-southcentralusazon11012041.outbound.protection.outlook.com
([40.93.195.41]:61403 helo=SN4PR2101CU001.outbound.protection.outlook.com)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <peraino@HIDDEN>) id 1v43ks-0003WA-AA
for 79550 <at> debbugs.gnu.org; Wed, 01 Oct 2025 16:48:56 -0400
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=LuxAJZs//SQmjHzwmGXYzlokA4LwCcne2cN876ZpkLZnO7fgxKp/W2iFumG0SnEpGtHzcHJO9fEolKhQNwcO5O/PcPK520qFsGvnXlQ/+w3Pz/+kLJYyUOTVH4FL//SFuAkb5v+ofe4nburr/ofN88paywnwHaI9CwmqKXxJEE2l0YlEJDzQljNX4MXkTRqtTCMQcvjaYqzWOJ/sQIzLV/UKm7D9rLmEHI0GQwUg5VF6Hz0ExUmUblk8ho/N88ntUHe5bX/DNI+vg+oqEQ4oStS4+mGsfQAk9woRuo/jcXPFf+pFSw6czljp73dUCvYfKkJE3s8Ja18GB5PMija4oA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
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=8WNzEMclGis86asEPp4DKKMbQFupSTWTSgUEb7dTjP0=;
b=vw2Fz4gak/uVKnBMpF/Dcy9cD70T5sH1VQxgE6eqGHL3HhkqVeiOtof88EzUA9Xkj8OJIcKRS7jEKGYV2JU1tW19TUivdJchnRoOFrc56cTEEeFNFx4d2IscgGctmM5A9KhOn9L7YY9OXYZ7zD9Q+XYTLQPaGdwhDYoFkEznGxi7MIK5v/IuMKU3QIkA+M1G+l/TwiekROlpC57BlpBvbFe3xkAjW28Lujm8EYQcmvnWygtQxImFkzViXWPUGrzhtHrrp1Xk4zQ+xiPunIls/q7yZP//Q1Iko2hkWpcxrnZhPzB39jPwkKQPkU2t7BPtUJUU1s5wMvyEt7KKiKix5w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=gmu.edu; dmarc=pass action=none header.from=gmu.edu; dkim=pass
header.d=gmu.edu; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmu.edu; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=8WNzEMclGis86asEPp4DKKMbQFupSTWTSgUEb7dTjP0=;
b=xp7/C7vjcERMWEHWyvDlWwtnT6OaJRqob8oqpZCL3J3FDZhCVWPIinaqKVfD7Ak332uZXqzEq5uM/BwdFtwdfsF1FDOLpqyis01hZPHzYzztz3vL9RR/JvZreMdD0q+flARlyuNOPQ+fwnHwEZ+NiAeWcYQTEqnWkjY3srX1TFQ=
Received: from IA0PR05MB10093.namprd05.prod.outlook.com
(2603:10b6:208:40f::22) by LV4PR05MB11223.namprd05.prod.outlook.com
(2603:10b6:408:2db::15) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9160.18; Wed, 1 Oct
2025 20:48:45 +0000
Received: from IA0PR05MB10093.namprd05.prod.outlook.com
([fe80::2f49:850a:6b05:ac6f]) by IA0PR05MB10093.namprd05.prod.outlook.com
([fe80::2f49:850a:6b05:ac6f%7]) with mapi id 15.20.9160.017; Wed, 1 Oct 2025
20:48:45 +0000
From: Bob Peraino <peraino@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>, Seth David Schoen <schoen@HIDDEN>
Subject: Re: bug#79550: Grammar bug in grep
Thread-Topic: bug#79550: Grammar bug in grep
Thread-Index: AQHcMtX8hjVGGrXL5k2BU+YHwFT+h7StqiUAgAANgICAAAn7rA==
Date: Wed, 1 Oct 2025 20:48:45 +0000
Message-ID: <IA0PR05MB100930A1C8600FBFFDB9DED68B1E6A@HIDDEN>
References: <IA0PR05MB100937FA02EFB816B6768A343B1E6A@HIDDEN>
<aN1+FpLqiKhMp2D8@demorgan>
<f3b8e8db-9396-4a7a-957d-3b7bdf2dbe4f@HIDDEN>
In-Reply-To: <f3b8e8db-9396-4a7a-957d-3b7bdf2dbe4f@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels:
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=gmu.edu;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: IA0PR05MB10093:EE_|LV4PR05MB11223:EE_
x-ms-office365-filtering-correlation-id: 7d951367-9909-4522-9ed8-08de012bea1a
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
ARA:13230040|376014|1800799024|366016|7053199007|38070700021|8096899003;
x-microsoft-antispam-message-info: =?us-ascii?Q?unTTr2q+wv9PUbhN89ILrszqaK+DFez3rG1GXgaETgJRd3R28GMgTvZ4KzSi?=
=?us-ascii?Q?cbaxeMxJWgE9UT1otEHc+UOtu1U0O2MdUvK5q0elG0er634QLDglC83UEC1S?=
=?us-ascii?Q?ycfYqOqvV/8UNiNE2lViXYlNUTUnPKDiMpPpc3Jn5bafr5zh3CrFy+Fqpyd7?=
=?us-ascii?Q?K+Vs7ohbt9qzlhkJwEq68BBIHk+b0PSyKRBRjhVUhoqqhE4mpeH7ADcaKTH9?=
=?us-ascii?Q?cD9etBOG9KQ0k/rjupU9U07D9+8AUjR7WdQoePUlJZaiwQkqK6xF8qvWKR7w?=
=?us-ascii?Q?BSyc3oLmnjPKiaa8k0XmP6x3JSgLU+BXUH64dwpEvTpvl4saI2osmUiBlXRD?=
=?us-ascii?Q?QxTvncu03Jz+Zx0oVm1Y3M2+bke5wT1JLkEhmS2asJ6hIyglYBSlRvdDzKt6?=
=?us-ascii?Q?g9Hh8V6bw6egdBy6s8F+cDD+kiSZB++VcHqIR2DPVHA6lGazTrFrHAzno09/?=
=?us-ascii?Q?lV725PFpHPURjnmMhC970I8feZNMh7WwWV9VE2uWr02zsBVLVXMOy5RzH6FL?=
=?us-ascii?Q?oD/ECOXrp9JjKmF7G21U3uk1l0NRHLliimyMuAPYDZgIoqBCTqVK45IoB5UJ?=
=?us-ascii?Q?PRZ2FUJFI2yCr8hq6WL1ZuP1MNOxrE8uZTVC9Lv4r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
=?us-ascii?Q?ym/DQOd9eBdLFcEihqQKBzo66uRwJDDmA0LI?=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
IPV:NLI; SFV:NSPM; H:IA0PR05MB10093.namprd05.prod.outlook.com; PTR:; CAT:NONE;
SFS:(13230040)(376014)(1800799024)(366016)(7053199007)(38070700021)(8096899003);
DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?RcngcvWj7JH1v2xvzMtSh5xrCpQKBnHQkJ3lyJ0/NgIaONOHUrtkCgzSXy9i?=
=?us-ascii?Q?NJ/7GJ8kAcWqYm/QoEExnsVfohVwj9Zwxc0l5WhlO3UJhLDYxDGUc0DV7pa4?=
=?us-ascii?Q?6Kjk1gFNAPdJwUS5TI/wn93HKCoihmvgoEBk961RRAE4CUdw3aFN61RxCl/u?=
=?us-ascii?Q?6o5d5MiR+zEUG/rngJcvaumnjFcrT5cDas4ua6IyD3nHs2V4YT7EVEoojDtH?=
=?us-ascii?Q?Yc8KXJQV9iRc35+6sSnPPjTWO78fzJ0a+lxlXIjkazVqvBKNk1mpG6bWDR4M?=
=?us-ascii?Q?fhHYXahBr50J58xvXPFKuF0Mb/fQ9EFkwHOIBOitCJFytNqY5ddJxpYuq1Yr?=
=?us-ascii?Q?KyhT+F46Ap4RIiVVQiSl8kY1pGLlaK9S7qKVlkwwirZtqO7jxJGMOtJxJH38?=
=?us-ascii?Q?Incce+ASPgs2wxBdXHofxak7wtvMJQeANQzCMj6fbuOoWMmJR7VE0XSa8Qi0?=
=?us-ascii?Q?w7CeofBFwT+kADKhRRv0NzQWT17EknMrO9Ko/jbRoLhGCHqzlY0bSWJ53O8h?=
=?us-ascii?Q?BPTUgau2GICVtNpAlup26gX66cYzKi3XRrpbjsXktc/Wg86sfv/rzjoYORxn?=
=?us-ascii?Q?O2VFU4p3frirS/Ol4Po2ZJhZjG6b5ACMWpJTguPl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13oaK23qJKczND99846VEWOITZyDAElK/jzxBj71cYnBkilgg8ml332VLUOz?=
=?us-ascii?Q?YtGUwsW8HMpGEMjlALA=3D?=
Content-Type: multipart/alternative;
boundary="_000_IA0PR05MB100930A1C8600FBFFDB9DED68B1E6AIA0PR05MB10093na_"
MIME-Version: 1.0
X-OriginatorOrg: gmu.edu
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: IA0PR05MB10093.namprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 7d951367-9909-4522-9ed8-08de012bea1a
X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Oct 2025 20:48:45.5850 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 9e857255-df57-4c47-a0c0-0546460380cb
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: ODRvBBhxm5fqR3J3iUs0U9CEZI9rDe9YGXKxbAnvmQiv6X1F4mTwyeWunQXdf9Yi
X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV4PR05MB11223
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79550
Cc: "79550 <at> debbugs.gnu.org" <79550 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
--_000_IA0PR05MB100930A1C8600FBFFDB9DED68B1E6AIA0PR05MB10093na_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Ok, this is reasonable. Mea culpa. I was ignorant. But purely waxing phi=
losophical (which I'm entitled to do at my age), escapes should be necessar=
y in order to make intention explicit so that errors can be caught.
What I left out was how I stumbled onto this. I decided to test Microsoft =
copilot by asking it to provide a regex for the format of an IP address in =
CIDR notation. It provided this:
^((25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2]=
)\/(3[0-2]|[12]?[0-9])$
Note the bolded right-bracket, which is in error. What I find interesting =
is that it got right what I considered the more challenging task of express=
ing that each octet can only be an 8-bit value, but couldn't follow a simpl=
e grammatical rule following the regex syntax.
________________________________
From: Paul Eggert <eggert@HIDDEN>
Sent: Wednesday, October 1, 2025 4:04 PM
To: Seth David Schoen <schoen@HIDDEN>
Cc: 79550 <at> debbugs.gnu.org <79550 <at> debbugs.gnu.org>; Bob Peraino <peraino@gmu=
.edu>
Subject: Re: bug#79550: Grammar bug in grep
External Message: Use Caution
On 2025-10-01 12:16, Seth David Schoen wrote:
> $ echo 'hello{' | egrep '{'
> hello{
> $ echo 'hello[' | egrep '['
> grep: Invalid regular expression
You're right that it's inconsistent. However, it's what AT&T/Sun egrep
does. I just now confirmed this with Solaris 10 /usr/bin/egrep:
$ echo 'hello{' | egrep '{'
hello{
$ echo 'hello[' | egrep '['
egrep: syntax error
7th Edition Unix egrep did not treat '{' as a metacharacter, and I
suspect that when AT&T (or Sun?) added support for '{...}' they did not
want to break existing scripts that used '{' as an ordinary character.
When GNU grep was written, its developers didn't want to break existing
scripts that assumed AT&T/Sun behavior, so they copied this
inconsistency. And changing GNU grep's behavior now might break things.
At least GNU grep's behavior is documented for these corner cases. You
probably won't be so lucky with non-GNU grep.
--_000_IA0PR05MB100930A1C8600FBFFDB9DED68B1E6AIA0PR05MB10093na_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
Ok, this is reasonable. Mea culpa. I was ignorant. But pu=
rely waxing philosophical (which I'm entitled to do at my age), escapes sho=
uld be necessary in order to make intention explicit so that errors can be =
caught.</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
What I left out was how I stumbled onto this. I decided to test Micro=
soft copilot by asking it to provide a regex for the format of an IP addres=
s in CIDR notation. It provided this:</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; color: rgb(0, 0, 0);" class=3D"elementToPro=
of">
<span style=3D"font-size: 12pt;">^((25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})\.){3}=
(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2</span><span style=3D"font-size: 18pt;"><b>=
]</b></span><span style=3D"font-size: 12pt;">)\/(3[0-2]|[12]?[0-9])$</span>=
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
Note the bolded right-bracket, which is in error. What I find interes=
ting is that it got right what I considered the more challenging task of ex=
pressing that each octet can only be an 8-bit value, but couldn't follow a =
simple grammatical rule following the
regex syntax.</div>
<div id=3D"appendonsend"></div>
<hr style=3D"display:inline-block;width:98%" tabindex=3D"-1">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" st=
yle=3D"font-size:11pt" color=3D"#000000"><b>From:</b> Paul Eggert <egger=
t@HIDDEN><br>
<b>Sent:</b> Wednesday, October 1, 2025 4:04 PM<br>
<b>To:</b> Seth David Schoen <schoen@HIDDEN><br>
<b>Cc:</b> 79550 <at> debbugs.gnu.org <79550 <at> debbugs.gnu.org>; Bob Peraino=
<peraino@HIDDEN><br>
<b>Subject:</b> Re: bug#79550: Grammar bug in grep</font>
<div> </div>
</div>
<div class=3D"BodyFragment"><font size=3D"2"><span style=3D"font-size:11pt;=
">
<div class=3D"PlainText">External Message: Use Caution<br>
<br>
<br>
On 2025-10-01 12:16, Seth David Schoen wrote:<br>
> $ echo 'hello{' | egrep '{'<br>
> hello{<br>
> $ echo 'hello[' | egrep '['<br>
> grep: Invalid regular expression<br>
<br>
You're right that it's inconsistent. However, it's what AT&T/Sun egrep<=
br>
does. I just now confirmed this with Solaris 10 /usr/bin/egrep:<br>
<br>
$ echo 'hello{' | egrep '{'<br>
hello{<br>
$ echo 'hello[' | egrep '['<br>
egrep: syntax error<br>
<br>
7th Edition Unix egrep did not treat '{' as a metacharacter, and I<br>
suspect that when AT&T (or Sun?) added support for '{...}' they did not=
<br>
want to break existing scripts that used '{' as an ordinary character.<br>
<br>
When GNU grep was written, its developers didn't want to break existing<br>
scripts that assumed AT&T/Sun behavior, so they copied this<br>
inconsistency. And changing GNU grep's behavior now might break things.<br>
<br>
At least GNU grep's behavior is documented for these corner cases. You<br>
probably won't be so lucky with non-GNU grep.<br>
<br>
</div>
</span></font></div>
</body>
</html>
--_000_IA0PR05MB100930A1C8600FBFFDB9DED68B1E6AIA0PR05MB10093na_--
bug-grep@HIDDEN:bug#79550; Package grep.
Full text available.
Received: (at 79550) by debbugs.gnu.org; 1 Oct 2025 20:37:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 01 16:37:57 2025
Received: from localhost ([127.0.0.1]:37360 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1v43aC-0002ms-Mf
for submit <at> debbugs.gnu.org; Wed, 01 Oct 2025 16:37:57 -0400
Received: from mail-northcentralusazlp170120005.outbound.protection.outlook.com
([2a01:111:f403:c105::5]:23529
helo=CH5PR02CU005.outbound.protection.outlook.com)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <peraino@HIDDEN>) id 1v43a5-0002lm-G2
for 79550 <at> debbugs.gnu.org; Wed, 01 Oct 2025 16:37:47 -0400
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=bFX5HeZvICkSFdzR5VhR9z8rxTrEukTkN9yfPENvR0lcMccGwOBJ+ATtYT/vuNgkZoKJGrDmNtZ6FKHZISYLxTXHhhW7mFlkit8XsfDSuI5AgaxmGiLF7peYLExMRP3ICr7gXxyMlqADKFFC5Ilg2Q4LTE8Sbx41Zq9L3qF0l8PdmfvNNEImoliWm8tuS2PqZWzqOELlNNzQVMUSA4myd1W1UiOkYcyEzC9hdWdmV2pk9lzKj3tHKUdSV4Y/mFj8WNwtCMQKtT8bfDCta1FXBOWMM0CaMR0P8NmTjCKL0RnMmQKhRiaJAgFuj0XJX8tvJ6U9ylgebpj6nvcLD18QSg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
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=g/771AuR+L8q4wafa/T5KHjHHHZJaWUHaD45qqI12ms=;
b=szYD99+1MU8H1PEwHw6NKWdItDLTFQ2Sx7PoxRqbpsvyNO3OVDotVpxyJVXcHO662c7JTZlaSW8G0vn/SqTH/fcoo/gSMvF8e1EDhSRMUCaxhBweZoBEb3EKBlwJVfDq/7GYGSdtSErqNsqDxwiD9QF+eGUmAZEUm7ViEst7rkE07VYF1cHxH+Oa1dJAoBfn8dlUgFyI2IG8+vnEBxLTVlJbzTXRp5T5jz3ndDe9Qxht0va1a3aeQiXkQMCkGYKsox5vmszIv8cBMvWcC7TO/m0gLWi+Pj5n+NYxCGyIla+zMsM5NYu2FvqPMLT2zF1YdRPsOsG1uxo4NmqD/PTMSQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=gmu.edu; dmarc=pass action=none header.from=gmu.edu; dkim=pass
header.d=gmu.edu; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmu.edu; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=g/771AuR+L8q4wafa/T5KHjHHHZJaWUHaD45qqI12ms=;
b=M3cpbwn99uX32hcGF2Oqd+alOWPJmZ3HQvMpKaZeqmqKgyzzA2ZSIxUuYzLmoN01MywJeN8cLrXoenysTCpmRE1Q8E0VV7d9+58aq+1bhpmkmFpqbWyPbzvsc50LElht9LR3grlrls0UuGIp2Jw2PLceqmigS/SJ43YlpQSwiq4=
Received: from IA0PR05MB10093.namprd05.prod.outlook.com
(2603:10b6:208:40f::22) by PH0PR05MB7701.namprd05.prod.outlook.com
(2603:10b6:510:26::17) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9160.17; Wed, 1 Oct
2025 20:37:35 +0000
Received: from IA0PR05MB10093.namprd05.prod.outlook.com
([fe80::2f49:850a:6b05:ac6f]) by IA0PR05MB10093.namprd05.prod.outlook.com
([fe80::2f49:850a:6b05:ac6f%7]) with mapi id 15.20.9160.017; Wed, 1 Oct 2025
20:37:35 +0000
From: Bob Peraino <peraino@HIDDEN>
To: Seth David Schoen <schoen@HIDDEN>
Subject: Re: bug#79550: Grammar bug in grep
Thread-Topic: bug#79550: Grammar bug in grep
Thread-Index: AQHcMtX8hjVGGrXL5k2BU+YHwFT+h7StqiUAgAACK98=
Date: Wed, 1 Oct 2025 20:37:35 +0000
Message-ID: <IA0PR05MB1009306D8F68251EAB832CBC7B1E6A@HIDDEN>
References: <IA0PR05MB100937FA02EFB816B6768A343B1E6A@HIDDEN>
<aN1+FpLqiKhMp2D8@demorgan>
In-Reply-To: <aN1+FpLqiKhMp2D8@demorgan>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels:
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=gmu.edu;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: IA0PR05MB10093:EE_|PH0PR05MB7701:EE_
x-ms-office365-filtering-correlation-id: 06b15b96-7824-47ba-faef-08de012a5abb
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
ARA:13230040|1800799024|376014|366016|38070700021|7053199007|8096899003;
x-microsoft-antispam-message-info: =?iso-8859-1?Q?y1o5VbNhkZmYxFY7ysgZWYQdlqpsPM7DtVySL8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?iso-8859-1?Q?47EHH5kFrrEvf6zrcaqOqI3dDGCNpazCdHVnmnL3lHc3Vm74wFhfuRUBjr?=
=?iso-8859-1?Q?/2rGqOm2gtUqmgsIWB/ROkxcI03S55fiUEnGx4lZDCQwW+jEjBNyIpqvhR?=
=?iso-8859-1?Q?C1AkyqYxaMMvcCiYsqRlwplreoCZSNLiwTOr7cIrVZsf4K+xpuCFKAi71V?=
=?iso-8859-1?Q?2GBB8Kdfi6VM5ixOxydJY8N2tUFAXyCo2J86lmBcppUeamkUIZ/97JjkLZ?=
=?iso-8859-1?Q?cTJ9RxACy4LUEEFIg69HtW5zCF5i/HtabE63YWsCt7xdFdRMLbDp4zMpne?=
=?iso-8859-1?Q?RN9vCrjRqGC7otJ7JaEJQeywScUA2su755llW6kxhoTLtWzf2vxBqS9d4O?=
=?iso-8859-1?Q?uz0JIRH2mmG3w8j39z0lewjCMDej0zb+jxczIV+PFouVTAeZoLkBRIqHRe?=
=?iso-8859-1?Q?WfpwhrBQWM4J0EzFjV0LFyIgmc1z50vVrVT0toeNz2jihbFC2m61a0mVik?=
=?iso-8859-1?Q?m9B8BmOwL8hCztDOyfABuCuX/FNA4wGjvCw2BmClKfQvtu4NyoXXnRR7SL?=
=?iso-8859-1?Q?KNv+c8adWpUdBX6MLXCX/quS24GRF3d57KH6h6ymBQhx0XYURl0aPU1oz6?=
=?iso-8859-1?Q?PaP61K9idSBIY9e+RUx7pfoq6GskGp8KHE2EAFhMUXoJIVllvg9rO4OzqC?=
=?iso-8859-1?Q?2i8YymhpMYQaj6B5BOcosCTKjFtJ?=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
IPV:NLI; SFV:NSPM; H:IA0PR05MB10093.namprd05.prod.outlook.com; PTR:; CAT:NONE;
SFS:(13230040)(1800799024)(376014)(366016)(38070700021)(7053199007)(8096899003);
DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-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qd5b+ZQJYk9SUz8+bd21DQoS0F6OdwX+7k1eFKly1fD?=
=?iso-8859-1?Q?RwuQ+aPcVwPdgeeBffwzN4YZQgCEoEJ7E5gnDe56VkXrVSemA93bacNlEA?=
=?iso-8859-1?Q?dHTG/cbSEECCxZ2mxPDdEVc1AMwhx5/GHn0x3C+bTyIdwTN8pf4Xar21M5?=
=?iso-8859-1?Q?mYOEFAYxocplC2hV0I/qMx8KaTw+gtlgfWAm4Y50O/fw5x41xS+Tbi8qG7?=
=?iso-8859-1?Q?aRW5sA8zaCRnEuC95A9VfGk1kTeGT3FusKnbkK/8BdBnkZ5egWY/iW6dQr?=
=?iso-8859-1?Q?l8A2HgNKdZM3qqgjEhCB93PSmbTS36h5w5mzpCKeIC77yfmiasA/Z0pHrM?=
=?iso-8859-1?Q?2CsQ8vINGj0j7ka343GaedA2Q7dSXWl1fOXz86CCAVQYLU3bHPHFE0Y2Ke?=
=?iso-8859-1?Q?J9xSCvQqrb6TSjkL6ofk9LHR4mx/w29A8nyqMbnIvnq71QwArj/baoWdeH?=
=?iso-8859-1?Q?xw+32F6mVpj41Cy+ZDf/SorbI3zp2BiDquZUrYt0bG1mrBlxKBXh3Chfs0?=
=?iso-8859-1?Q?AOIQZbpH/uH/gdgB/ouym4FAtGSWTz2RoOMJnyZVqdn4BLo9wtcQAaOE/0?=
=?iso-8859-1?Q?3Rub84y880iQYuySZOR+u65VPWFRFz2DNbWzxptaG765AX856abDeBcjaq?=
=?iso-8859-1?Q?ujt+stOnPPUGyjc4aKV72i35N1OHJ/i+2m7ymgrPW3d24W2bYEVotIe/Xx?=
=?iso-8859-1?Q?+fv/2BLNbNHczY2LxcRyPgoA2WwWfT4azpvwyrkSCUmGlb9s6osV4BhOIG?=
=?iso-8859-1?Q?c6HttdjvBu1o8=3D?=
Content-Type: multipart/alternative;
boundary="_000_IA0PR05MB1009306D8F68251EAB832CBC7B1E6AIA0PR05MB10093na_"
MIME-Version: 1.0
X-OriginatorOrg: gmu.edu
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: IA0PR05MB10093.namprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 06b15b96-7824-47ba-faef-08de012a5abb
X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Oct 2025 20:37:35.5643 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 9e857255-df57-4c47-a0c0-0546460380cb
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: O6JIjrS3/OTn6cNG7wYGnxU7M2xifXsnZGr+bbw/8lot2Fvme/1GmnVl3RCRLsLx
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR05MB7701
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 79550
Cc: "79550 <at> debbugs.gnu.org" <79550 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
--_000_IA0PR05MB1009306D8F68251EAB832CBC7B1E6AIA0PR05MB10093na_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi, thanks for the reply. I'd like to respond to each section:
"To me, this behavior is logical, because it assumes that the lack of
a matching brace indicates that the author of the expression simply
wasn't intending to use the repetition syntax at all."
The problem with this assumption is that it means all mismatches are intent=
ional and there are no mismatch errors. Ever. If the author of the expres=
sion was intending a literal match, then the opening curly brace should hav=
e been escaped. This is how intentional literals can be properly exprresse=
d, while also catching all unintentional mismatches.
"That would follow an intuition like "metacharacters are only metacharacter=
s if they're used within a correct context".
This intuition enforces my previous point because it means it will catch no=
balance errors. Everything is assumed intentional, leading to strange res=
ults.
"But it's inconsistent with the treatment of [], where the opening bracket =
is always a metacharacter regardless of whether it's used to introduce a va=
lid character-class expression."
And the lack of consistency was going to be my next point, albeit cross-pla=
tform. A regex should behave the same cross-platform. The Mac's grep is d=
erived from AT&T Unix (the mother of all greps?) and it seems to me that GN=
U should at least be compatible with pre-existing behavior, other design ph=
ilosophies aside.
________________________________
From: Seth David Schoen <schoen@HIDDEN>
Sent: Wednesday, October 1, 2025 3:16 PM
To: Bob Peraino <peraino@HIDDEN>
Cc: 79550 <at> debbugs.gnu.org <79550 <at> debbugs.gnu.org>
Subject: Re: bug#79550: Grammar bug in grep
External Message: Use Caution
To me, this behavior is logical, because it assumes that the lack of
a matching brace indicates that the author of the expression simply
wasn't intending to use the repetition syntax at all. That would follow
an intuition like "metacharacters are only metacharacters if they're
used within a correct context".
But it's inconsistent with the treatment of [], where the opening
bracket is always a metacharacter regardless of whether it's used
to introduce a valid character-class expression.
$ echo 'hello{' | egrep '{'
hello{
$ echo 'hello[' | egrep '['
grep: Invalid regular expression
--_000_IA0PR05MB1009306D8F68251EAB832CBC7B1E6AIA0PR05MB10093na_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
Hi, thanks for the reply. I'd like to respond to each section:</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<b>"To me, this behavior is logical, because it assumes that the lack =
of<br>
a matching brace indicates that the author of the expression simply<br>
wasn't intending to use the repetition syntax at all."</b></div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
The problem with this assumption is that it means all mismatches are intent=
ional and there are no mismatch errors. Ever. If the author of =
the expression was intending a literal match, then the opening curly brace =
should have been escaped. This is how intentional
literals can be properly exprressed, while also catching all unintentional=
mismatches.</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt;" class=3D"elementToProof">
<span style=3D"color: rgb(0, 0, 0);"><b>"That would follow an intuitio=
n like "metacharacters are only metacharacters if they're used within =
a correct context".</b></span></div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
This intuition enforces my previous point because it means it will catch no=
balance errors. Everything is assumed intentional, leading to strang=
e results.</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt;" class=3D"elementToProof">
<span style=3D"color: rgb(0, 0, 0);"><b>"But it's inconsistent with th=
e treatment of [], where the opening bracket is always a metacharacter rega=
rdless of whether it's used to introduce a valid character-class expression=
."</b></span></div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
And the lack of consistency was going to be my next point, albeit cross-pla=
tform. A regex should behave the same cross-platform. The Mac's=
grep is derived from AT&T Unix (the mother of all greps?) and it seems=
to me that GNU should at least be compatible
with pre-existing behavior, other design philosophies aside.</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<hr style=3D"display: inline-block; width: 98%;">
<div id=3D"divRplyFwdMsg">
<div style=3D"direction: ltr; font-family: Calibri, sans-serif; font-size: =
11pt; color: rgb(0, 0, 0);">
<b>From:</b> Seth David Schoen <schoen@HIDDEN><br>
<b>Sent:</b> Wednesday, October 1, 2025 3:16 PM<br>
<b>To:</b> Bob Peraino <peraino@HIDDEN><br>
<b>Cc:</b> 79550 <at> debbugs.gnu.org <79550 <at> debbugs.gnu.org><br>
<b>Subject:</b> Re: bug#79550: Grammar bug in grep</div>
<div style=3D"direction: ltr;"> </div>
</div>
<div style=3D"font-size: 11pt;">External Message: Use Caution<br>
<br>
<br>
To me, this behavior is logical, because it assumes that the lack of<br>
a matching brace indicates that the author of the expression simply<br>
wasn't intending to use the repetition syntax at all. That would foll=
ow<br>
an intuition like "metacharacters are only metacharacters if they're<b=
r>
used within a correct context".<br>
<br>
But it's inconsistent with the treatment of [], where the opening<br>
bracket is always a metacharacter regardless of whether it's used<br>
to introduce a valid character-class expression.<br>
<br>
$ echo 'hello{' | egrep '{'<br>
hello{<br>
$ echo 'hello[' | egrep '['<br>
grep: Invalid regular expression</div>
</body>
</html>
--_000_IA0PR05MB1009306D8F68251EAB832CBC7B1E6AIA0PR05MB10093na_--
bug-grep@HIDDEN:bug#79550; Package grep.
Full text available.
Received: (at 79550) by debbugs.gnu.org; 1 Oct 2025 20:05:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 01 16:05:10 2025
Received: from localhost ([127.0.0.1]:37218 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1v434Y-0005Wb-2D
for submit <at> debbugs.gnu.org; Wed, 01 Oct 2025 16:05:10 -0400
Received: from mail.cs.ucla.edu ([131.179.128.66]:33202)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <eggert@HIDDEN>)
id 1v434S-0005RT-Qh
for 79550 <at> debbugs.gnu.org; Wed, 01 Oct 2025 16:05:06 -0400
Received: from localhost (localhost [127.0.0.1])
by mail.cs.ucla.edu (Postfix) with ESMTP id C88823C010848;
Wed, 1 Oct 2025 13:04:57 -0700 (PDT)
Received: from mail.cs.ucla.edu ([127.0.0.1])
by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP
id X3saSfiLhOd0; Wed, 1 Oct 2025 13:04:57 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
by mail.cs.ucla.edu (Postfix) with ESMTP id A0AD43C010860;
Wed, 1 Oct 2025 13:04:57 -0700 (PDT)
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu A0AD43C010860
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu;
s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1759349097;
bh=3XhmxAob6ZoMQbT8Fw/yY/RBjZ2GfiOkafg4PpxDY5s=;
h=Message-ID:Date:MIME-Version:To:From;
b=IrGJ4+hmYG/0WYpJpoxk9D29VTNvsLfudyrWx7mFSlhbPENRZeu1S1EbtkbiBFxqu
c3XFfB5J9PSDjPtWNaFtOpxU0mM9jB4aQsiRxPakG7x0qQZVVfmJqYJroDeNpTiGd/
3wJkFIRnHK/X12wvEMJKEj+xAkp7TSoeqX1CQenE2nolOnjfhHMzzutqOx0vLlHgSN
+T52A8E3rRbrwYYn20OSvDkZLULaJlmA1CZQsdydf5ocUsNR9Qn4cZmeD7+1WyvdNk
nUIgVqoPik3KCFgwnZvIT2oDcYl+ONDOEnGF2t6Kv6pMibe6dcn7ERJYDkC8Uy9NQa
089212jTBa24Q==
X-Virus-Scanned: amavis 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]) (amavis, port 10026) with ESMTP
id gK6YG_fwUYwe; Wed, 1 Oct 2025 13:04:57 -0700 (PDT)
Received: from penguin.cs.ucla.edu
(47-154-17-226.fdr01.snmn.ca.ip.frontiernet.net [47.154.17.226])
by mail.cs.ucla.edu (Postfix) with ESMTPSA id 7F5793C010848;
Wed, 1 Oct 2025 13:04:57 -0700 (PDT)
Message-ID: <f3b8e8db-9396-4a7a-957d-3b7bdf2dbe4f@HIDDEN>
Date: Wed, 1 Oct 2025 13:04:57 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#79550: Grammar bug in grep
To: Seth David Schoen <schoen@HIDDEN>
References: <IA0PR05MB100937FA02EFB816B6768A343B1E6A@HIDDEN>
<aN1+FpLqiKhMp2D8@demorgan>
Content-Language: en-US
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
In-Reply-To: <aN1+FpLqiKhMp2D8@demorgan>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79550
Cc: 79550 <at> debbugs.gnu.org, Bob Peraino <peraino@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
On 2025-10-01 12:16, Seth David Schoen wrote:
> $ echo 'hello{' | egrep '{'
> hello{
> $ echo 'hello[' | egrep '['
> grep: Invalid regular expression
You're right that it's inconsistent. However, it's what AT&T/Sun egrep
does. I just now confirmed this with Solaris 10 /usr/bin/egrep:
$ echo 'hello{' | egrep '{'
hello{
$ echo 'hello[' | egrep '['
egrep: syntax error
7th Edition Unix egrep did not treat '{' as a metacharacter, and I
suspect that when AT&T (or Sun?) added support for '{...}' they did not
want to break existing scripts that used '{' as an ordinary character.
When GNU grep was written, its developers didn't want to break existing
scripts that assumed AT&T/Sun behavior, so they copied this
inconsistency. And changing GNU grep's behavior now might break things.
At least GNU grep's behavior is documented for these corner cases. You
probably won't be so lucky with non-GNU grep.
bug-grep@HIDDEN:bug#79550; Package grep.
Full text available.
Received: (at 79550-done) by debbugs.gnu.org; 1 Oct 2025 19:48:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 01 15:48:11 2025
Received: from localhost ([127.0.0.1]:37180 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1v42o7-0004iF-10
for submit <at> debbugs.gnu.org; Wed, 01 Oct 2025 15:48:11 -0400
Received: from mail.cs.ucla.edu ([131.179.128.66]:39750)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <eggert@HIDDEN>)
id 1v42o0-0004hb-53
for 79550-done <at> debbugs.gnu.org; Wed, 01 Oct 2025 15:48:06 -0400
Received: from localhost (localhost [127.0.0.1])
by mail.cs.ucla.edu (Postfix) with ESMTP id 9639B3C010848;
Wed, 1 Oct 2025 12:47:56 -0700 (PDT)
Received: from mail.cs.ucla.edu ([127.0.0.1])
by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP
id V27O9HvHbKkR; Wed, 1 Oct 2025 12:47:56 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
by mail.cs.ucla.edu (Postfix) with ESMTP id 6CA353C010860;
Wed, 1 Oct 2025 12:47:56 -0700 (PDT)
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 6CA353C010860
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu;
s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1759348076;
bh=v9Jxrhm6kFU5bno+mZbwhFPWb2fQdVCj3iLLjeumhWA=;
h=Message-ID:Date:MIME-Version:To:From;
b=OQ0LLCrZssnJ5zjcK0dkjkOIWeReaaQbRMSONH1DpTmu4VKdwLfn8tdnjRhyFtIRE
yNvjK2zEyoGjdXJQQVCN1MAJTpnoT9rcUDX8W/tEh8CKxMgGkSx0PJVvFKbq9ZDcPB
RxVZ/YYn4FL8WDZXL+gT8WROQStcd8SdZQjmPz/lPCJslMEXByn5B60eElqXyQiqNK
arl7IVR8zdXk+rdzTyXNMORNXLzrcBUXroBVy+WTm3tvtpJJvq8Zxib3CSLVW9kreM
+QqyYDR4wIPbTc56pE78IHTmq/83Hn6VPrBVq9X+gDo7OqusCGl85yDJRirgVl2utr
mQ3S1euBFF6Kg==
X-Virus-Scanned: amavis 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]) (amavis, port 10026) with ESMTP
id AdFJ38Xm70iH; Wed, 1 Oct 2025 12:47:56 -0700 (PDT)
Received: from penguin.cs.ucla.edu
(47-154-17-226.fdr01.snmn.ca.ip.frontiernet.net [47.154.17.226])
by mail.cs.ucla.edu (Postfix) with ESMTPSA id 4B95C3C010848;
Wed, 1 Oct 2025 12:47:56 -0700 (PDT)
Message-ID: <baa9ca18-2440-4067-80e8-25fa08269085@HIDDEN>
Date: Wed, 1 Oct 2025 12:47:55 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: bug#79550: Grammar bug in grep
To: Bob Peraino <peraino@HIDDEN>
References: <IA0PR05MB100937FA02EFB816B6768A343B1E6A@HIDDEN>
Content-Language: en-US
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
In-Reply-To: <IA0PR05MB100937FA02EFB816B6768A343B1E6A@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79550-done
Cc: 79550-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
The behavior you describe is documented and is not a bug; see:
https://www.gnu.org/software/grep/manual/html_node/Problematic-Expression=
s.html
and look for "In an extended regular expression, unescaped =E2=80=98{=E2=80=
=99 that does=20
not begin a valid interval expression."
Here are some more details about this portability issue.
On 2025-10-01 06:35, Bob Peraino wrote:
> ^1{2,3]2$
Because this ERE has an unmatched brace, POSIX says that grep produces=20
undefined results for it; see=20
<https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap09.html=
#tag_09_04_03>,=20
which talks about what happens "If a <left-brace> is not part of a valid=20
interval expression".
> The Mac version of grep (AT&T origin) properly flags this:
>=20
> % egrep '^1{2,3]2$'
> egrep: invalid repetition count(s)
Although the macOS behavior conforms to POSIX, I don't think it is AT&T=20
origin. Traditional egrep behaves like GNU grep -E. You can see this,=20
for example, in Solaris 10 egrep, which is closer to the AT&T tradition=20
than macOS egrep is. The traditional behavior also conforms to POSIX=20
since POSIX says grep can do whatever it likes.
Traditional egrep and GNU grep -E are more likely to do the intended=20
thing when a user mistakenly thinks that '{' is an ordinary character.=20
macOS egrep diagnoses this use of an unportable ERE that could well be a=20
typo. Neither approach strictly dominates the other.
Bob Peraino <peraino@HIDDEN>:Paul Eggert <eggert@HIDDEN>:
Received: (at 79550) by debbugs.gnu.org; 1 Oct 2025 19:16:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 01 15:16:59 2025
Received: from localhost ([127.0.0.1]:37098 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1v42Ju-0001x9-MI
for submit <at> debbugs.gnu.org; Wed, 01 Oct 2025 15:16:58 -0400
Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]:59141)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <schoen@HIDDEN>)
id 1v42Jo-0001wn-25
for 79550 <at> debbugs.gnu.org; Wed, 01 Oct 2025 15:16:55 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id 147BA4461B;
Wed, 1 Oct 2025 19:16:41 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=loyalty.org; s=gm1;
t=1759346203;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=h1HBCEMIJ2zbDeDsOdkkgQriHfEDFBH5x7TA2k3iUlw=;
b=FkK2JDsV6FuVPSsT/wa2DUwafp8YzGaFcwfcRgnHjIUINqS8GrS+LMNjXg4ZHfEi6dBsda
gbR9zP7lCLWEBTFVhOsuNzGxvIb5L5x1Iy9wbVuAyQlnqcEus5FXNZU44pByWjuvF35NCx
41q/WvT9IqyH2/QGNujku7p0TuZcZijsMxkiZI+OWiX98fHChhp7UupLoMxrhq+xpCyanS
P/OIoLMeRmmcdW/wtIxSBmm03pvBpLDRWfUVng5jsNHWDoYus/mUuAzK5nzKxGObmMkJQJ
T1gdZinuu9R1X7fRK/uPWQZ8v02EyQKyS4pFBo1QjQKF/IIHQaiMi5a8MbiOXQ==
Date: Wed, 1 Oct 2025 12:16:38 -0700
From: Seth David Schoen <schoen@HIDDEN>
To: Bob Peraino <peraino@HIDDEN>
Subject: Re: bug#79550: Grammar bug in grep
Message-ID: <aN1+FpLqiKhMp2D8@demorgan>
References: <IA0PR05MB100937FA02EFB816B6768A343B1E6A@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <IA0PR05MB100937FA02EFB816B6768A343B1E6A@HIDDEN>
X-GND-Sasl: schoen@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 79550
Cc: 79550 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
To me, this behavior is logical, because it assumes that the lack of
a matching brace indicates that the author of the expression simply
wasn't intending to use the repetition syntax at all. That would follow
an intuition like "metacharacters are only metacharacters if they're
used within a correct context".
But it's inconsistent with the treatment of [], where the opening
bracket is always a metacharacter regardless of whether it's used
to introduce a valid character-class expression.
$ echo 'hello{' | egrep '{'
hello{
$ echo 'hello[' | egrep '['
grep: Invalid regular expression
bug-grep@HIDDEN:bug#79550; Package grep.
Full text available.
Received: (at submit) by debbugs.gnu.org; 1 Oct 2025 16:44:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 01 12:44:17 2025
Received: from localhost ([127.0.0.1]:36565 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1v3zw8-00062I-EJ
for submit <at> debbugs.gnu.org; Wed, 01 Oct 2025 12:44:17 -0400
Received: from lists.gnu.org ([2001:470:142::17]:51046)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <peraino@HIDDEN>) id 1v3x53-00080Y-7D
for submit <at> debbugs.gnu.org; Wed, 01 Oct 2025 09:41:18 -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 <peraino@HIDDEN>) id 1v3x4t-0005Bk-PU
for bug-grep@HIDDEN; Wed, 01 Oct 2025 09:41:08 -0400
Received: from mail-northcentralusazon11010021.outbound.protection.outlook.com
([52.101.193.21] helo=CH1PR05CU001.outbound.protection.outlook.com)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <peraino@HIDDEN>) id 1v3x4O-0002VT-3w
for bug-grep@HIDDEN; Wed, 01 Oct 2025 09:41:07 -0400
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=tndr/r13/Mm/lySQiWZMSXW85s3Rm+jqJK69VKfSVi/B/lZPyHcJc3qVR5poO/shgpKqwipo2dGVamWMqqSbuQ2CAt9YIUwbKDxOqtTOxf/uJzq5uXJcX9clkVF2VxvILVYBnJ/G3/NtAq+0+bzZzRGW9xsfRwYP4s66YaOUmL62fYzg8wJ5RrFo+IGKmqDs7dK6xq76LHn9QXLBslJ8iZFYiPOSisdLpuBEDnkZN46Inm3/iTllBAhfy6tObrhGeUo/Fv77eZTPK2w8f/F/CCqDMpl8aCU1IEo4RETHWXnxd40qR/XRdJ0QGLmnpcBunllRcrlHBftK38QLG+6TLg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
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=6ToldhzAD0PCARgCUWiTjvPbLyewo5oaBlyU9kwSvkg=;
b=IgojQwiVuUZ2cKwymUpc34tLqctZiTeTPdeHa+Ch8v48UFtiXeCP3fTZROv4uS9rjdurw1qqNozjY9m/gOJGvCfZXGKDGYp+D0Kg4iPhqLOT0S89Q6k8V/raNZALqg9Gg7rGV1mWSxzald8aAR9K597xYrzbRJTyO+NCQxELEPXs2jUVyaxjHGHGOCYnWSuV242fUqn0MfllvcpG5nVuNVBgtYadSG0DcCqkETDuwoaY0houClAp6IaIkpMTzcY2pYMtOp1x7ksXMkj04bPcW6OsIWue6GbS9Wf8d88tAr96zw2BKvONQBuKbKYiYB4NflRPzB1pRtHhqVFT232sUg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=gmu.edu; dmarc=pass action=none header.from=gmu.edu; dkim=pass
header.d=gmu.edu; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmu.edu; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=6ToldhzAD0PCARgCUWiTjvPbLyewo5oaBlyU9kwSvkg=;
b=UWf8sipPsqF1CL2OFOK7Br/rmv9VworNE5aIA61d3ivlL7uDFRgHkW38GBzvPLG+T/K6t3VFAp4ZbsyGe4ZD7HF1QBu0ufdRQL0vVejIo7fzFS7KZ3BNMRbdTNYP1xT0pQ2EV4GmBWPl+gwFuzUINtS8DEsrsnJXB48Kr9Kr3To=
Received: from IA0PR05MB10093.namprd05.prod.outlook.com
(2603:10b6:208:40f::22) by DS0PR05MB11161.namprd05.prod.outlook.com
(2603:10b6:8:292::14) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9160.18; Wed, 1 Oct
2025 13:35:20 +0000
Received: from IA0PR05MB10093.namprd05.prod.outlook.com
([fe80::2f49:850a:6b05:ac6f]) by IA0PR05MB10093.namprd05.prod.outlook.com
([fe80::2f49:850a:6b05:ac6f%7]) with mapi id 15.20.9160.017; Wed, 1 Oct 2025
13:35:19 +0000
From: Bob Peraino <peraino@HIDDEN>
To: "bug-grep@HIDDEN" <bug-grep@HIDDEN>
Subject: Grammar bug in grep
Thread-Topic: Grammar bug in grep
Thread-Index: AQHcMtX8hjVGGrXL5k2BU+YHwFT+hw==
Date: Wed, 1 Oct 2025 13:35:19 +0000
Message-ID: <IA0PR05MB100937FA02EFB816B6768A343B1E6A@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels:
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=gmu.edu;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: IA0PR05MB10093:EE_|DS0PR05MB11161:EE_
x-ms-office365-filtering-correlation-id: de9ce879-97ec-4416-eac2-08de00ef5d78
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
ARA:13230040|376014|1800799024|366016|38070700021|8096899003;
x-microsoft-antispam-message-info: =?iso-8859-1?Q?awennUY+U/iblIeOTx6L6AT+1xxiRIacxvcVxqeZWWsLGS5U3Vyw/f9m7X?=
=?iso-8859-1?Q?S/MxfkTOm9lMdzONRoS3zGEsnVNR4T0fZAqF0FL2KEwEQEnZ1ypTysKb2n?=
=?iso-8859-1?Q?ajjUslQub0nGRZW1ODQE4SengsCJwCyWJiF8li4m5rijn6SVStaL7gXUJC?=
=?iso-8859-1?Q?ZgVv82r/x2s/wY4ZqBLCWdZYYEE1atWIcT+c5mdv/nS9I//hRoe7QqM3cw?=
=?iso-8859-1?Q?wUa78ul/FLpOtuGIwDuktz7rDhL20xskGwshi/s6UwKXdXz/R8JsIblqQU?=
=?iso-8859-1?Q?ii3mxOCL+IZH69IR+1sxVeDAaLexIfaxaTt0Cr/QGkCa1FBm8tmUREyM+/?=
=?iso-8859-1?Q?vRNAS+C+luqpTW7lvAPuuH0EVQYEWwJso6cupbA7cfucmOdNwIzChzU9sl?=
=?iso-8859-1?Q?FsxNjuSqbqv8+IFtzJ5M+2UkiDjqR8d3tIbacztYe7NTvOKIDjex+hvQ0X?=
=?iso-8859-1?Q?Apx1dKUuyou3pgkXbxDI7OiHQo1Olk5bzSU3c9HTexbkQB3C45lckEk7Em?=
=?iso-8859-1?Q?k5GBWKX2wOIWMTGpDq8rXK6BvmcAe+dp+ToHJohwTKA+eiomRRijMg0Rti?=
=?iso-8859-1?Q?bHj6NyH8I7TqwEcIh/enB+mOOjm/M5vFN+neivGbAWr73jS8Wo2QzF2TwD?=
=?iso-8859-1?Q?I0JjnVcklrDYc2o2cy/Wm6bsj+lyNJowwCrBw1jiL3wQ1dXF94wdmrl3m4?=
=?iso-8859-1?Q?6YHYHEmI+erFjOkrA0tuiCY1G7qHGggqD14Hl7x8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:; LANG:en; SCL:1; SRV:;
IPV:NLI; SFV:NSPM; H:IA0PR05MB10093.namprd05.prod.outlook.com; PTR:; CAT:NONE;
SFS:(13230040)(376014)(1800799024)(366016)(38070700021)(8096899003); DIR:OUT;
SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?Vzds+jAe04P1ogdd6Ph2DsqGOcBAGRzdXTpXYXVrL8QFnYnPxff1pg1uPb?=
=?iso-8859-1?Q?z/9k4R09kpUeW3ADAKXMKwCHzcAXr3Smj0KVOhaJqqbRegmZoc7ZPWLPbj?=
=?iso-8859-1?Q?zJSIX9STGEFPANU5WdJUkkM/l3aAUyWAcyXJTb/JXLdK+nLONbEMEv3vb/?=
=?iso-8859-1?Q?54d+EAXBCCD7ETHJZwKTGZa18HLVwwtA8G8FWiy19dJiRyR/xGO/LQo7i5?=
=?iso-8859-1?Q?7iamucdLEUzGE0ERSkzm1tLkRJUFsSnUWR5FzE2ubsXdlahn0OeLA1cu3+?=
=?iso-8859-1?Q?xdC4wuUrbQL3CxDeXgYNeS7D7k5liEGOQKp8g99L7Y924sSCMD1RW9x3kF?=
=?iso-8859-1?Q?3FAoIBiQOtWrKOEVLdtn8MDoMfjc9vQEcmsjbJZg3wsq/flhXAfQ3iWaDp?=
=?iso-8859-1?Q?IyKAofpEXIgtY7tvHi3q71VGvCvLgxltajjK3KI05R64w4KTqTpmE7tTzD?=
=?iso-8859-1?Q?wTHJsTiMVeefo65paW1J6U6uQHd9cZy+i6NsU7JqOhN+F0YIpe9bFwgO9C?=
=?iso-8859-1?Q?YJaiPVeeY6PLazg3Jm1ZuRCGCDsRoFzFmK2OHC/rPKiv2Og+ucU13aRLc0?=
=?iso-8859-1?Q?8Ve0TRsJFmXVpv1xNhUFRZeYuP8v/0We4gfjmyZUqsq6aSf9J/Ab/L3bs3?=
=?iso-8859-1?Q?H/eJkddbu1WAoEyAKSyTI2x74DUzO10uOVmu/UUIh8h5m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yB3omdxZJvp4gb3sczuOSKbqaRwXZht3sRx9Za20ZMC2+Jco5EiHkn1?=
=?iso-8859-1?Q?fMO2zfyB9VThA=3D?=
Content-Type: multipart/alternative;
boundary="_000_IA0PR05MB100937FA02EFB816B6768A343B1E6AIA0PR05MB10093na_"
MIME-Version: 1.0
X-OriginatorOrg: gmu.edu
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: IA0PR05MB10093.namprd05.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: de9ce879-97ec-4416-eac2-08de00ef5d78
X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Oct 2025 13:35:19.8017 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 9e857255-df57-4c47-a0c0-0546460380cb
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: lMUPsZy9GKPQxCXchhegWzzjoHU0KKQiFbEC2eyunDlqSZxjuQinE6EbJlgRdlnV
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR05MB11161
Received-SPF: pass client-ip=52.101.193.21; envelope-from=peraino@HIDDEN;
helo=CH1PR05CU001.outbound.protection.outlook.com
X-Spam_score_int: -16
X-Spam_score: -1.7
X-Spam_bar: -
X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1,
DKIM_SIGNED=0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001,
RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_PASS=-0.001,
T_SPF_HELO_TEMPERROR=0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 01 Oct 2025 12:44:14 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)
--_000_IA0PR05MB100937FA02EFB816B6768A343B1E6AIA0PR05MB10093na_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
I have encountered what I believe is a bug in GNU grep 3.8.
Consider the following simple regular expression with a mismatched brace:
^1{2,3]2$
The Mac version of grep (AT&T origin) properly flags this:
% egrep '^1{2,3]2$'
egrep: invalid repetition count(s)
%
GNU grep does not. Instead, it seems to backtrack and take away metacharac=
ter status from the brace, and therefore expects a literal match, so the on=
ly input that would be accepted is:
1{2,3]2
Regards,
Bob Peraino
--_000_IA0PR05MB100937FA02EFB816B6768A343B1E6AIA0PR05MB10093na_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
Hello,</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
I have encountered what I believe is a bug in GNU grep 3.8.</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
Consider the following simple regular expression with a mismatched brace:</=
div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
^1{2,3]2$</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
The Mac version of grep (AT&T origin) properly flags this:</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
% egrep '^1{2,3]2$'<br>
egrep: invalid repetition count(s)</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
%</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
GNU grep does not. Instead, it seems to backtrack and take away metac=
haracter status from the brace, and therefore expects a literal match, so t=
he only input that would be accepted is:</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
1{2,3]2</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
Regards,</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, "Aptos_EmbeddedFont", "Apt=
os_MSFontService", Calibri, Helvetica, sans-serif; font-size: 12pt; co=
lor: rgb(0, 0, 0);" class=3D"elementToProof">
Bob Peraino</div>
</body>
</html>
--_000_IA0PR05MB100937FA02EFB816B6768A343B1E6AIA0PR05MB10093na_--
Bob Peraino <peraino@HIDDEN>:bug-grep@HIDDEN.
Full text available.bug-grep@HIDDEN:bug#79550; Package grep.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.