From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 26 11:29:43 2020 Received: (at submit) by debbugs.gnu.org; 26 Mar 2020 15:29:43 +0000 Received: from localhost ([127.0.0.1]:59503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHURz-00073n-94 for submit@debbugs.gnu.org; Thu, 26 Mar 2020 11:29:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:34336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jHTLJ-00059l-9K for submit@debbugs.gnu.org; Thu, 26 Mar 2020 10:18:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35293) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHTLH-0006K6-S8 for bug-sed@gnu.org; Thu, 26 Mar 2020 10:18:45 -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,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHTLG-0003Zx-NU for bug-sed@gnu.org; Thu, 26 Mar 2020 10:18:43 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:36545) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jHTLG-0003Yo-C3 for bug-sed@gnu.org; Thu, 26 Mar 2020 10:18:42 -0400 Received: by mail-wm1-x32c.google.com with SMTP id g62so7221026wme.1 for ; Thu, 26 Mar 2020 07:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=5v4sFLDb/5r7/EC6Tr+BWuI2l7PBlGMPBcSxhm0CnCA=; b=Cx6lqNuxucSSFl0L882hLzsZ2cOGZDYZrn8BB7+hLR4YRN/lHUtpjuCZ4DaY+Ue5wr oujcuB8TTJi6zvhDUW5/MfwsN7sBzi3yoL+ss9O/Vv+6oAjlZ6Mj2eAeOINt+9LZQZEE qOH/VoB7Gfs2elHU2HT4BooP4QvSsgJsbwBGlV+1YWBI5qmvMnhlHNJkpGIqOPgizVDu U3ma2eJVWiXhBwgZ5uA3Dh3ivX6p335DTQRdT5+JbHTMgWZvgySAl5CJd7MZLj/Qaq7w W4NzBcfmIAxxy9zIv9FhXX2ofZ+t3VnnIVT/pN/v3H1dLhw8GRxLKbQIdXPup0pFt9HK VGqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=5v4sFLDb/5r7/EC6Tr+BWuI2l7PBlGMPBcSxhm0CnCA=; b=YhlBp+nY+xO3f8nnw62naDMdeWoB1KGuW1Y4x8G+3XxZUuOg9QUoDcBwz9dzOpg1pz 1GLsuIBMDBvenKTNdqCSjsNnCeOUY27tZO9iVa9MuiHJRojdLcLmLLMRgj+hmQTnMnRb kL6II2lC1SzKR3U8l89MXYIZBtCWJ1CRXRcM+UjNH+Vvo+J5sIZdBtC3Uyz7HTXzIU3t qHzfoYs1BiqvN8D02p1GEY3FEYsV/XHBky6UPn7kkIK31P6RgZXtZuPggSF658wcpu3g 4RIS76sVVveDojRdG9GE429a9wAp9CpcScg6n5nmpHwo7wRs6Ib/9hl6gh9pdEC1mTbH tz9Q== X-Gm-Message-State: ANhLgQ3TpM+mIU+8p/OECY0MyQ5LNwM6VRv6m7CzQkcqQpXH3SAqbLJh u5IB+bGFXuBiKMI6mBxpdlAfJWC0Et9cmHOm50f7BhOP X-Google-Smtp-Source: ADFU+vvun/TxwVO/p5g3Tx8c9Iiixv36oyahg1iDHZ8cB+Mx5LXmVzc439+BmmIkjovSBhkfwDD94a+VED2AbYErGQ8= X-Received: by 2002:a05:600c:54f:: with SMTP id k15mr200237wmc.76.1585232319781; Thu, 26 Mar 2020 07:18:39 -0700 (PDT) MIME-Version: 1.0 From: Enrico Maria De Angelis Date: Thu, 26 Mar 2020 14:18:28 +0000 Message-ID: Subject: Bug in how \cregexpc is handled To: bug-sed@gnu.org Content-Type: multipart/alternative; boundary="0000000000004ea02f05a1c2a9e8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32c X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 26 Mar 2020 11:29:42 -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: -0.7 (/) --0000000000004ea02f05a1c2a9e8 Content-Type: text/plain; charset="UTF-8" To whom it may concern, >From man sed, I read: \cregexpc Match lines matching the regular expression regexp. The c may be any character. On the one hand - sed '\cncd' <<< n correctly shows empty output, since it's the same as sed '/n/d' <<< n based on the description above; - sed '\c\ccd' <<< c correctly shows an empty output too, but in this case the letter needed to be escaped for obvious reasons. On the other hand: - sed '\n\nnd' <<< n results in an output equal to the single character n, revealing that the backslash is having a double effect: 1. it prevents the following n from closing the opening \n. 2. it interprets the n as a newline instead of the literal letter n; this is confirmed by executing echo -e 'a\na' | sed -n 'N;\n\nnp'. The is means that using n in \nregexpn prevevents the use of the literal n in the regexp. The issue has come to light in this StackOverflow question. Kind regards, Enrico Maria De Angelis --0000000000004ea02f05a1c2a9e8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
To whom it may concern,

From man sed, I read:
=C2=A0 = =C2=A0 =C2=A0 =C2=A0\cregexpc
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 Match lines matching the regular expression regexp.=C2=A0 The c may = be any character.

On = the one hand
  • sed '\cn= cd' <<< n=C2=A0correct= ly shows empty output, since it's the same as=C2=A0sed '/n/d' <<< n based on the descripti= on above;
  • sed '\c\ccd' <<<= ; c correctly shows an empty output too, but in this case the letter= needed to be escaped for obvious reasons.
=C2=A0On the other hand= :
  • sed '\n\nnd' <<< n results in an output equal to the single character n, revealing that the backslash is having a double effect:
  • it prevents the following n from clos= ing the opening \n.
  • it interprets t= he n as a newline instead of the literal le= tter n; this is confirmed by executing=C2= =A0echo -e 'a\na' | sed -n 'N;\n\nnp&#= 39;.
The is means that using = n in \nregexpn prevevents=C2=A0the u= se of the literal n in the regexp.

The issue has come to = light in this StackOverflow question.

Kind regards,
Enrico Maria De Angelis
--0000000000004ea02f05a1c2a9e8-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 31 00:47:12 2020 Received: (at 40239) by debbugs.gnu.org; 31 Mar 2020 04:47:12 +0000 Received: from localhost ([127.0.0.1]:35383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJ8nw-0001pN-5Y for submit@debbugs.gnu.org; Tue, 31 Mar 2020 00:47:12 -0400 Received: from mail-pj1-f41.google.com ([209.85.216.41]:36435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJ8nu-0001p3-3i; Tue, 31 Mar 2020 00:47:10 -0400 Received: by mail-pj1-f41.google.com with SMTP id nu11so561999pjb.1; Mon, 30 Mar 2020 21:47:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=ojJ9QCLFwHOSpAcOAyLAEFVjmhrnpR+EFgnq2epfkF4=; b=XnMVrj1N0JdlZYHuEGtOJnH0P/MyWkXWVbiikEEI7voiS0OVIWvGp7Q4gqbnChoCas XAbRFsAXj1dhYhAJK3ayZT1LYcr1+koomyV8ZUEBTglism6n5rQTI7A5Qo8VkaGuUCou SLgIwXsd8DhyZfjZZhuExot5YFFHbPt0JWotqHQ2A5TsXXJfJtml8T6l0HEcMt5jsPQ4 WJsppR11IwO1oP6/oOgxMHKy6zzCOuo4RiqIdM3VcrOiRJgLDNcgi7lJNzPYTRYHQpjK Dr49TAIl66gNOzujinM7RIi2uhRtUeGV62Xjxr6IV++868/Jv0/I4feUq0oZ4S3iZYPS laGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ojJ9QCLFwHOSpAcOAyLAEFVjmhrnpR+EFgnq2epfkF4=; b=AGIcnQIbel2QZemOfgCN2gV17mPmKXuLLzsGJeyomtQ/UJ8s899fCTv+xMSXyirBPN 1N1ojwbv2dGwBOF3nuFUNmsRi3smfoxKdHpC1ydGC41rmrkM5U5LyC2QnMplfbMMjrdH 0qlI76LM22cD9E9fdC54A7ZFLZ5TNrGUN2pwTO3GbQBDtkgJqSqjURcjN9yAf77ec67h BMrDrUOtE9tTSbw5u46fkszykHDHzzEr+3dbNJseDcqRW5iC/xsmUteC1BvKQTeFYwcW kkLuoclQvRrRjLBnALSaEsuQM4rLUqNR0gee6OMbIZN8tCOgdb06OHlKbEbeBUyI51ds 4+jQ== X-Gm-Message-State: AGi0PuYjAZtNab59g3RQhCXlg0mSgsMGV/Brx7axdpMgrzqq9K+dxvD3 Yu8tkCt50bGc6v3LGE/WkNPqLYF2 X-Google-Smtp-Source: APiQypK4DBGx/9t588UpwRpMTMICv5So2EJwMUKCLTK8Bc/c+V6JdCAa7zp8eePcP5jEWZQqcLQ3pA== X-Received: by 2002:a17:90a:cb18:: with SMTP id z24mr1678868pjt.67.1585630023642; Mon, 30 Mar 2020 21:47:03 -0700 (PDT) Received: from tomato.moose.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id t186sm10659038pgd.43.2020.03.30.21.47.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Mar 2020 21:47:02 -0700 (PDT) Subject: Re: bug#40239: Bug in how \cregexpc is handled To: Enrico Maria De Angelis , 40239@debbugs.gnu.org References: From: Assaf Gordon Message-ID: Date: Mon, 30 Mar 2020 22:47:01 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40239 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.0 (-) merge 40239 40242 stop Hello, On 2020-03-26 8:18 a.m., Enrico Maria De Angelis wrote: [...] > The is means that using n in \nregexpn prevevents the use of the literal n > in the regexp. > > The issue has come to light in this StackOverflow > > question. Thank you for the report. The original poster (Oguz Ismail) sent a similar issue, please see the reply there: http://debbugs.gnu.org/40242 regards, - assaf From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 31 00:47:44 2020 Received: (at control) by debbugs.gnu.org; 31 Mar 2020 04:47:44 +0000 Received: from localhost ([127.0.0.1]:35386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJ8oS-0001qW-JT for submit@debbugs.gnu.org; Tue, 31 Mar 2020 00:47:44 -0400 Received: from mail-pl1-f179.google.com ([209.85.214.179]:44632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJ8oP-0001qH-Ry for control@debbugs.gnu.org; Tue, 31 Mar 2020 00:47:42 -0400 Received: by mail-pl1-f179.google.com with SMTP id h11so7644050plr.11 for ; Mon, 30 Mar 2020 21:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=w1B8uD2bucppmC+14k3BZQ9q6Bq8v3XYrQdyEm1uBi0=; b=jYB23K3oM2rixRBsKMwIAPl2oCtP0v0oN2j/Jxa535CWj4avINBJEDG5T/LrcOsQFV EMWaxHyMv25UxysUptpjJbwxvf/9CFJAzdElEfNJQhluRiJIh9jHJCCXVtyzFJrVg4O0 yh1tPHCaxkOk995Atros701Gj/L2Sdpp6fpc/nhIW79mc16AUj0Q6Ng0s1z23AdILlcQ qMhc9Mf8LFYf2DJt/gs3KFgflavl+6FiZpktVmG2GHCjCd+oKt+gsJZNkQNPPvMOCuIy CBw+GqL5YzgqwbqD3Xb1zqkNjpukHkWh/z1snnWVyCrJXF0kifyCazOeEcozU0bc4/y0 H0Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=w1B8uD2bucppmC+14k3BZQ9q6Bq8v3XYrQdyEm1uBi0=; b=sIGnHMcTpW2vCw1JGm+Co4FAhPMK8U7cD1T3boi8VIcv1dip3DTbIvoV0DRm4jcKbn WXBAY7aVrimo2yjgENMqumsNrM2RJhaCsz/1Wxqbu2ycOhbwzkqRdvcAQ/gbQCJMwR0R ovTnJ5VqHnA9rsiU3ytDLcApct8BIZNN63WfCxDKyMGYhVOyOAz4CY9K7+RZpnfUESY/ aa9nX3x/vYZEcaKiQPj8be/N+KXYyEvdIMBYh7TBATq3ErfufN+E0fcKVnNc8aYQFzhr z0eTsGVihvfNwLJuK7w7CU0I2MQr9op6UccOaHnaXd7frjCHKu4AZMvCYseQSjrYzRlN CDGQ== X-Gm-Message-State: AGi0Pub4tqoZgu7TkjRQWb6yH62W3kOS/+0/Mw1vZVrFn8fgAKYPGNaV ccPni/Kbx9BSKTPMdGDnRBT0WFN5 X-Google-Smtp-Source: APiQypKJ/8++o8JEupLZ/7Rf9ZnEDZMRN8+r7goHQ5Lu3B5v/lVls3irBJkAZDKQ4Gcc88FYSg0N5Q== X-Received: by 2002:a17:90a:7182:: with SMTP id i2mr1718750pjk.74.1585630055561; Mon, 30 Mar 2020 21:47:35 -0700 (PDT) Received: from tomato.moose.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id c20sm6834526pfr.96.2020.03.30.21.47.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Mar 2020 21:47:34 -0700 (PDT) To: control@debbugs.gnu.org From: Assaf Gordon Message-ID: <35b24d39-77b1-f352-cf07-03127079ae76@gmail.com> Date: Mon, 30 Mar 2020 22:47:33 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tag 40242 confirmed Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.214.179 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.214.179 listed in wl.mailspike.net] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: control 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.0 (+) tag 40242 confirmed From unknown Thu Sep 11 01:11:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 21 Nov 2022 12:24:09 +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