From unknown Tue Sep 09 13:16:28 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#20571 <20571@debbugs.gnu.org> To: bug#20571 <20571@debbugs.gnu.org> Subject: Status: sed 4.2.2 Reply-To: bug#20571 <20571@debbugs.gnu.org> Date: Tue, 09 Sep 2025 20:16:28 +0000 retitle 20571 sed 4.2.2 reassign 20571 sed submitter 20571 Massimo Masotti severity 20571 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu May 14 05:16:16 2015 Received: (at submit) by debbugs.gnu.org; 14 May 2015 09:16:16 +0000 Received: from localhost ([127.0.0.1]:44415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YspFW-0001kv-4x for submit@debbugs.gnu.org; Thu, 14 May 2015 05:16:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58856) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YsoN2-0008Tm-HU for submit@debbugs.gnu.org; Thu, 14 May 2015 04:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsoMw-0000H5-6b for submit@debbugs.gnu.org; Thu, 14 May 2015 04:19:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsoMw-0000Gv-3Q for submit@debbugs.gnu.org; Thu, 14 May 2015 04:19:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsoMu-0007Ql-VV for bug-sed@gnu.org; Thu, 14 May 2015 04:19:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsoMr-0000DO-PC for bug-sed@gnu.org; Thu, 14 May 2015 04:19:48 -0400 Received: from smtp-31.italiaonline.it ([212.48.25.159]:49771 helo=libero.it) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsoMr-0000CH-H1 for bug-sed@gnu.org; Thu, 14 May 2015 04:19:45 -0400 Received: from webmail-62.iol.local ([10.255.26.61]) by smtp-31.iol.local with bizsmtp id TkKj1q01H1K6C3N0XkKjzH; Thu, 14 May 2015 10:19:44 +0200 x-libjamoibt: 1601 X-CNFS-Analysis: v=2.1 cv=FKbmvLcs c=1 sm=1 tr=0 a=Z4loFQCHklllzpmPGkwIKw==:117 a=2qI9VIQDg4AA:10 a=WDNOraKMCBgA:10 a=tewBFMlVOMMA:10 a=zN5CCcjU7mIdF14Q66cA:9 a=QEXdDO2ut3YA:10 a=F5axu7PiMFwA:10 a=5m775X9gT28A:10 a=lCNYu2V3pIF8Cbf8jpEA:9 a=c8zwYbtzx4O9ONEQ:21 Message-ID: <1598282453.4485651431591583908.JavaMail.httpd@webmail-62.iol.local> Date: Thu, 14 May 2015 10:19:43 +0200 (CEST) From: Massimo Masotti To: bug-sed@gnu.org Subject: sed 4.2.2 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_500689_950117729.1431591583907" X-SenderIP: 78.110.190.229 X-libjamv: zJyUr2dXFcQ= X-libjamsun: +h0esSirHBb1Xx1kXiem+XWAVKS8jPOo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2014; t=1431591584; bh=Bi2ZocVb9zUl5qCIsJ5A8C6u+LE83iL4TKn2p0HbBuo=; h=Date:From:Reply-To:To:Subject; b=BpU6a+rp3GEdtxLyEnPTsICSZI9yOzH9emh9muSDqNejABiFZvQoW8cIMFsposif0 KMAT+jivJ2wb0fPjiwVm9m3En/N2/VREf59ceVbzFmZOxP6eY+nl1Yk6AqYp5AlRZf dA++PpyarJgx6tKlr/IafC/Kg73d1YSL1LEo2kfn/KD+l/KNDZVgOaYtsQsfAz4qc/ A9Pd81NRoJHO/JsUzxR7nEXlSgbEnt7v3Nuvxugb2lO0tjWcKXVr2XTOv4MjSVikxj UZgGxonOY2OlAJLq+tX0RZdiALuEp5GV/B/al1C3ZKA26dMCQuCfdL/TmCBR6pQy8K OFkmN8yCYLeag== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 14 May 2015 05:16:12 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Massimo Masotti List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) ------=_Part_500689_950117729.1431591583907 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Good morning, the file contains "8.25F, \n". I notice a strange behavior with this line: sed -i -r 's/([0-9])F([,; \]\}\)])/\1\2/g' file while I'm expecting to get "8.25, \n", the content is not changed. To get the expected substitution, I must use: sed -i -r 's/([0-9])F([,; \}\)])/\1\2/g' file as if it is not legal to use the escaped character ']'. Thanks for your time; I apologize if I'm wrong. Best Regards Massimo Masotti - Italy ------=_Part_500689_950117729.1431591583907 Content-Type: text/html;charset="UTF-8" Content-Transfer-Encoding: 7bit
Good morning,

the file contains "8.25F, \n". I notice a strange behavior with this line:

sed -i -r 's/([0-9])F([,; \]\}\)])/\1\2/g'  file

while I'm expecting to get "8.25, \n", the content is not changed. To get the expected substitution, I must use:

sed -i -r 's/([0-9])F([,; \}\)])/\1\2/g'  file

as if it is not legal to use the escaped character  ']'.

Thanks for your time; I apologize if I'm wrong.

Best Regards


Massimo Masotti - Italy





------=_Part_500689_950117729.1431591583907-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 14 06:28:58 2015 Received: (at submit) by debbugs.gnu.org; 14 May 2015 10:28:58 +0000 Received: from localhost ([127.0.0.1]:44468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YsqNt-0003eN-L6 for submit@debbugs.gnu.org; Thu, 14 May 2015 06:28:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36100) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YsqNr-0003e7-JK for submit@debbugs.gnu.org; Thu, 14 May 2015 06:28:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsqNl-0000b1-EI for submit@debbugs.gnu.org; Thu, 14 May 2015 06:28:50 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsqNl-0000av-B7 for submit@debbugs.gnu.org; Thu, 14 May 2015 06:28:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsqNk-0006pu-EF for bug-sed@gnu.org; Thu, 14 May 2015 06:28:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsqNg-0000SW-BT for bug-sed@gnu.org; Thu, 14 May 2015 06:28:48 -0400 Received: from mout.gmx.net ([212.227.15.15]:49625) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsqNg-0000RR-2Q for bug-sed@gnu.org; Thu, 14 May 2015 06:28:44 -0400 Received: from zoot.sax ([88.87.214.78]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0LvEZe-1ZJpOa3SZG-010MsB for ; Thu, 14 May 2015 12:28:42 +0200 Date: Thu, 14 May 2015 12:28:41 +0200 From: Davide Brini To: bug-sed@gnu.org Subject: Re: bug#20571: sed 4.2.2 In-Reply-To: <1598282453.4485651431591583908.JavaMail.httpd@webmail-62.iol.local> References: <1598282453.4485651431591583908.JavaMail.httpd@webmail-62.iol.local> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID: <0M5tof-1Z8YqJ47WT-00xvuW@mail.gmx.com> X-Provags-ID: V03:K0:qYgsWjodBnKhNCy9HcEwn2chicPqePZD7Wje0Ybot7x52horggP W565binX9B636RUU4UXsHGvG8ip0lEfM5z9OQ2/M2vnF6oDBC/94Txwzzri15m1sZ5uJalN Zon3njbXkWHfx3xtAdie08gQasmso5BaXVX//kxNyr2gXplFzITIwYo6jPD07scU4VK97NZ NFYcvdaHi8adI7JklTYWg== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) On Thu, 14 May 2015 10:19:43 +0200 (CEST), Massimo Masotti wrote: > Good morning, > > the file contains "8.25F, \n". I notice a strange behavior with this line: > > sed -i -r 's/([0-9])F([,; \]\}\)])/\1\2/g' file > > while I'm expecting to get "8.25, \n", the content is not changed. To get > the expected substitution, I must use: > > sed -i -r 's/([0-9])F([,; \}\)])/\1\2/g' file > > as if it is not legal to use the escaped character ']'. If you want to use a "]" inside a bracket expression, specify it as the very first character (after the ^ negation, if present, but that's not your case). And you don't need to escape } and ) inside the bracket expression, so sed -i -r 's/([0-9])F([],; })])/\1\2/g' file Here what's inside the [] is ],; }) -- D. From debbugs-submit-bounces@debbugs.gnu.org Thu May 14 11:06:30 2015 Received: (at 20571-done) by debbugs.gnu.org; 14 May 2015 15:06:30 +0000 Received: from localhost ([127.0.0.1]:45167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YsuiQ-0007BN-0t for submit@debbugs.gnu.org; Thu, 14 May 2015 11:06:29 -0400 Received: from mail-ig0-f174.google.com ([209.85.213.174]:34956) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YsuiK-0007Au-Q7 for 20571-done@debbugs.gnu.org; Thu, 14 May 2015 11:06:24 -0400 Received: by igbyr2 with SMTP id yr2so169479354igb.0 for <20571-done@debbugs.gnu.org>; Thu, 14 May 2015 08:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=D9wnZo215AJXZif93MRnLnW6KOB/72CFvdhKCk2vxOo=; b=UXtaq/ZfteEYvqHkeu17fgtNA3o2l7T0tLl4IHNW5dxpC6IxwXJwnQnSqb6TOa7dZ5 7nRdYHlNgDRKsYpFoGW/7U44vwdF5U8/DroQeTCFpxFJzUKosNRbnP2hCbpp8lOgJXXA fZmdpgE8jq91SMjGaUsCoBUPU2OFJCBtV5KHA/x2hF0RMygOoCWRrgo2Oue4v8D55z38 D9WWIlFg1AGyWkfUl9T3sF0huNcSF+cPjvP0W2bzq/nX28DxNPTZFylBLcWoUzGDsfdC 8NHFbIIkbkNtn6J6rcuXd/WQZicKAiPOt2dkF6r3Y31PmTISiNEZUzs9z27zkaLXj12x pvoA== X-Received: by 10.42.23.17 with SMTP id q17mr3897358icb.4.1431615975064; Thu, 14 May 2015 08:06:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.62.229 with HTTP; Thu, 14 May 2015 08:05:54 -0700 (PDT) In-Reply-To: <0M5tof-1Z8YqJ47WT-00xvuW@mail.gmx.com> References: <1598282453.4485651431591583908.JavaMail.httpd@webmail-62.iol.local> <0M5tof-1Z8YqJ47WT-00xvuW@mail.gmx.com> From: Jim Meyering Date: Thu, 14 May 2015 08:05:54 -0700 X-Google-Sender-Auth: vgsGWiMeMX0TDBMaWSL9sBeZflA Message-ID: Subject: Re: bug#20571: sed 4.2.2 To: Davide Brini Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20571-done Cc: 20571-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 20571 notabug thanks On Thu, May 14, 2015 at 3:28 AM, Davide Brini wrote: > On Thu, 14 May 2015 10:19:43 +0200 (CEST), Massimo Masotti > wrote: > >> Good morning, >> >> the file contains "8.25F, \n". I notice a strange behavior with this line: >> >> sed -i -r 's/([0-9])F([,; \]\}\)])/\1\2/g' file >> >> while I'm expecting to get "8.25, \n", the content is not changed. To get >> the expected substitution, I must use: >> >> sed -i -r 's/([0-9])F([,; \}\)])/\1\2/g' file >> >> as if it is not legal to use the escaped character ']'. > > If you want to use a "]" inside a bracket expression, specify it as the > very first character (after the ^ negation, if present, but that's not > your case). And you don't need to escape } and ) inside the bracket > expression, so > > sed -i -r 's/([0-9])F([],; })])/\1\2/g' file > > Here what's inside the [] is > > ],; }) Thanks for helping, Davide. Massimo, I'm marking this as "notabug" and closing the auto-filed issue. From debbugs-submit-bounces@debbugs.gnu.org Thu May 14 11:18:22 2015 Received: (at 20571) by debbugs.gnu.org; 14 May 2015 15:18:22 +0000 Received: from localhost ([127.0.0.1]:45187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ysutx-0007gM-KE for submit@debbugs.gnu.org; Thu, 14 May 2015 11:18:21 -0400 Received: from smtp-35.italiaonline.it ([212.48.25.163]:51842 helo=libero.it) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ysutw-0007g2-2b for 20571@debbugs.gnu.org; Thu, 14 May 2015 11:18:20 -0400 Received: from webmail-62.iol.local ([10.255.24.192]) by smtp-35.iol.local with bizsmtp id TrJD1q01G48gftm0brJDZj; Thu, 14 May 2015 17:18:14 +0200 x-libjamoibt: 1601 X-CNFS-Analysis: v=2.1 cv=NMgogBOg c=1 sm=1 tr=0 a=MoGBALzkWaHALTnEPnsIBg==:117 a=2qI9VIQDg4AA:10 a=WDNOraKMCBgA:10 a=tewBFMlVOMMA:10 a=IkcTkHD0fZMA:10 a=mDV3o1hIAAAA:8 a=_AsO1XktTAZfcj-woKcA:9 a=QEXdDO2ut3YA:10 a=F5QhziGwxCgA:10 a=r8rP_NjxUOsA:10 Message-ID: <1577182514.4664771431616693972.JavaMail.httpd@webmail-62.iol.local> Date: Thu, 14 May 2015 17:18:13 +0200 (CEST) From: Massimo Masotti To: <20571@debbugs.gnu.org> Subject: R: bug#20571: closed (Re: bug#20571: sed 4.2.2) MIME-Version: 1.0 Content-Type: text/plain;charset="UTF-8" Content-Transfer-Encoding: 7bit X-SenderIP: 78.110.190.229 X-libjamv: dFpkSBwzuvQ= X-libjamsun: cSFfuntKQuH6yVhmEVZQ96Ud7Fr8oxji DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=libero.it; s=s2014; t=1431616694; bh=JkzPmBQEzE66b1GjYEE0gHA8LHZpzHwo9VPN7VPPBZU=; h=Date:From:Reply-To:To:Subject; b=Ls5xTX+iYzalukYFpxq+a2diPbfkqlbi2Bu4RGd6rz2v04V9fgcieJ8m9zcxDVjkR fuy57yUfbMl1vLQGdCRixxVq6qaf50Gx0xUDwgotWKr9e1CGBO2v7j+v9rzi3bEmHz I3s5AJFkBVUewbTDKgzwLxuosP3SPoXKwVs2W2q9sEHS+Ty5bZ8CkdwvzgD73gg4Jc k5DXGF3VVfKASiuhX1LoY9vPNrxrgNRPGH77b/PeoEjHPy5GkX57huqWWeijbqOkaj ErF1Pg6s5CmqJLjKh2mqfl/ftoReB9dJ8J99ZWoWBfEjtTzULiVprPJjVZofVB8Mfm jUUEuylHScghA== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20571 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Massimo Masotti 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: 0.0 (/) Hi, thanks for the explanation, even if a mathematical set, as it is inside [ ], would be position independent. Kind Regards Massimo Masotti >----Messaggio originale---- >Da: help-debbugs@gnu.org >Data: 14/05/2015 17.07 >A: "Massimo Masotti" >Ogg: bug#20571: closed (Re: bug#20571: sed 4.2.2) > >Your bug report > >#20571: sed 4.2.2 > >which was filed against the sed package, has been closed. > >The explanation is attached below, along with your original report. >If you require more details, please reply to 20571@debbugs.gnu.org. > >-- >20571: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20571 >GNU Bug Tracking System >Contact help-debbugs@gnu.org with problems > From unknown Tue Sep 09 13:16:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 12 Jun 2015 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator