From unknown Sat Sep 06 14:23:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#68776: bug with escape characters in pattern Resent-From: Brendan Richardson Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sun, 28 Jan 2024 08:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68776 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 68776@debbugs.gnu.org X-Debbugs-Original-To: bug-grep@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1706431467347 (code B ref -1); Sun, 28 Jan 2024 08:45:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jan 2024 08:44:27 +0000 Received: from localhost ([127.0.0.1]:56556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rU0m9-00005O-JU for submit@debbugs.gnu.org; Sun, 28 Jan 2024 03:44:27 -0500 Received: from lists.gnu.org ([2001:470:142::17]:60254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTsbo-0001np-0Z for submit@debbugs.gnu.org; Sat, 27 Jan 2024 19:01:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTsbY-0002Sl-VK for bug-grep@gnu.org; Sat, 27 Jan 2024 19:00:56 -0500 Received: from mx0a-002d6a01.pphosted.com ([148.163.151.213]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTsbW-0000hj-3c for bug-grep@gnu.org; Sat, 27 Jan 2024 19:00:56 -0500 Received: from pps.filterd (m0132168.ppops.net [127.0.0.1]) by mx0b-002d6a01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 40RJS9oV013797 for ; Sat, 27 Jan 2024 19:00:50 -0500 Authentication-Results: ppops.net; spf=pass smtp.mailfrom=brichardson@brandeis.edu Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by mx0b-002d6a01.pphosted.com (PPS) with ESMTPS id 3vvy7js04f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sat, 27 Jan 2024 19:00:50 -0500 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2cf3534b797so11358241fa.0 for ; Sat, 27 Jan 2024 16:00:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brandeis.edu; s=google; t=1706400047; x=1707004847; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=u8nrnYjmdxuApq/sOC4R+/GM58LDXiBPZWCmsQyndg0=; b=mepib3yrSIaznEZojWP2MsJT+HqM4Am1r6Is3z3xuM8uMfi026tMVZb0j62js1028A Hp9zgYJK5YvRucYpBt3WP3eCfJO/x050LcUIAyOaoJNGxcxTWmku+jPxqGdWRH8btlEO OQYHh8HARb87FuaPT5p2UfIyQ88cevRGvAJko= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706400047; x=1707004847; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=u8nrnYjmdxuApq/sOC4R+/GM58LDXiBPZWCmsQyndg0=; b=TqUEZVe9mGy7vLTOV9CJppSermCvcIUogO8mP7XxVdYEL1I2P5zyk0oyMYRNpnqaLu Y9ybxwxcm/00xz0VMqJa7XJsBnMTql5znT29v9TnYeSqP9lN0EKDNsp3g+nXNC1kr0V3 WGFkcr8oSOGDT6ErIPoxsPfn04+w1Wf5MaixpNUNUnh9Jn9Yn6ftRlOjTclJMnomSFEY aLAcjQztIakjFYR/u5aNzOHa5Ox1fE/jIlM2tngTXjKfjgF+htAjn8EzYtZBYkRqVoI3 4xNWOnblZmu4qm9k9NzcWgmNC9bsXCu7VqVDmzZ+hnUOT0XCJDB1wXR/aneV063UxfS7 c3wg== X-Gm-Message-State: AOJu0YwD4pDBQOOvucTmcJAgRxcn/dFGz666pz3MjvNBN7tCb7gCAVtB 4ZekNMuXuY6dB4YOjRGHS8umCSdi6HP40rSc4OME/sCbiWvGqpelYlSbgLX9U3OmLAnHV7sxQ6E sEHm9XHbcJi0ONPRv1xleYYo2B4RGARKQsHnnjjOmXKpaWfa/5Dn4+2j81TQi6QQYNxRu9wcNnT 41HGgh4T6/4Rqf/+xId/P5QBfc5QU= X-Received: by 2002:a05:651c:c8d:b0:2cd:dc68:829b with SMTP id bz13-20020a05651c0c8d00b002cddc68829bmr2127844ljb.23.1706400047559; Sat, 27 Jan 2024 16:00:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzN/6aiJShL7uDtctLS6iI5OzrdPNKYY8v0lZH5FCdOPPxaCWAWB0RBLdXehRy+4h9kWE/pKC+gD0O9fWfdiE= X-Received: by 2002:a05:651c:c8d:b0:2cd:dc68:829b with SMTP id bz13-20020a05651c0c8d00b002cddc68829bmr2127838ljb.23.1706400047180; Sat, 27 Jan 2024 16:00:47 -0800 (PST) MIME-Version: 1.0 From: Brendan Richardson Date: Sat, 27 Jan 2024 19:00:37 -0500 Message-ID: Content-Type: multipart/alternative; boundary="000000000000a8438e060ff63856" X-Proofpoint-ORIG-GUID: ThsAcswQxPj5NXe6f6nYgNNK84wdBy4l X-Proofpoint-GUID: ThsAcswQxPj5NXe6f6nYgNNK84wdBy4l X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 impostorscore=0 phishscore=0 mlxlogscore=277 spamscore=0 malwarescore=0 clxscore=1011 lowpriorityscore=0 priorityscore=1501 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401270182 Received-SPF: pass client-ip=148.163.151.213; envelope-from=brichardson@brandeis.edu; helo=mx0a-002d6a01.pphosted.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Sun, 28 Jan 2024 03:44:20 -0500 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 (-) --000000000000a8438e060ff63856 Content-Type: text/plain; charset="UTF-8" Hello, If you use input egrep "[^\\n\\t]" file and the file contains a line with only n or t on it, those lines are also excluded file normal lines tttttt nnnnn KR Brendan Richardson --000000000000a8438e060ff63856 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

If you use input
egrep= "[^\\n\\t]" file

and the file conta= ins a line with only n or t on it, those lines are also excluded
= file
normal lines
tttttt
nnnnn

=


KR
Brendan Richardson
--000000000000a8438e060ff63856-- From unknown Sat Sep 06 14:23:43 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Brendan Richardson Subject: bug#68776: closed (Re: bug#68776: bug with escape characters in pattern) Message-ID: References: <325fad6c-cc51-4cf9-ab8a-55d6f57c8635@cs.ucla.edu> X-Gnu-PR-Message: they-closed 68776 X-Gnu-PR-Package: grep Reply-To: 68776@debbugs.gnu.org Date: Mon, 29 Jan 2024 02:36:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1706495762-7992-1" This is a multi-part message in MIME format... ------------=_1706495762-7992-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #68776: bug with escape characters in pattern which was filed against the grep package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 68776@debbugs.gnu.org. --=20 68776: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D68776 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1706495762-7992-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 68776-done) by debbugs.gnu.org; 29 Jan 2024 02:35:51 +0000 Received: from localhost ([127.0.0.1]:58701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUHV1-00024S-E4 for submit@debbugs.gnu.org; Sun, 28 Jan 2024 21:35:51 -0500 Received: from mail.cs.ucla.edu ([131.179.128.66]:34414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUHUz-00024D-Ma for 68776-done@debbugs.gnu.org; Sun, 28 Jan 2024 21:35:50 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id B0DB83C011BE0; Sun, 28 Jan 2024 18:35:35 -0800 (PST) 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 fq2IZXNKzFYt; Sun, 28 Jan 2024 18:35:35 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 758753C013279; Sun, 28 Jan 2024 18:35:35 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 758753C013279 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1706495735; bh=G3VNgVGQo/BMxqkBCV0Pln5GUN6jLC1g/REsb3kQdnc=; h=Message-ID:Date:MIME-Version:To:From; b=iCdsXXYchNeStx1X2osnsdH1BPEVSS50gEZ3qSMFKcGa1qsNooXjs3unE4wuxMbmE R5ZVJYf3666Zdprr+8PPTbx5+LeXOPszOXstHMn3Bmcp4mbM+rokcnZln7m4c/AveI eobfQC/XACFGNbXg3vB87hIId1OGBkW/P8ZpFRCDceivbBEdY1SyNKuXD9+ZDdh1Z0 I4Pf2NQkoCgzu8Q+IRB77rNrn/VJiFw5P+xEJeZqXyIJv0SWmlYTjx60Ll5witS7Tl 1052yXdzUKGCGXE2uyLX5wjtxuMf0LueBBQHKZoVJHuj7oFOrbgr+0e8JqGcHsWhA9 F06HAlKIP+0Gw== 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 arINBqDh0aOj; Sun, 28 Jan 2024 18:35:35 -0800 (PST) Received: from [192.168.254.12] (unknown [47.148.192.211]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 511453C011BE0; Sun, 28 Jan 2024 18:35:35 -0800 (PST) Message-ID: <325fad6c-cc51-4cf9-ab8a-55d6f57c8635@cs.ucla.edu> Date: Sun, 28 Jan 2024 18:35:35 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#68776: bug with escape characters in pattern Content-Language: en-US To: Brendan Richardson References: From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68776-done Cc: 68776-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2024-01-27 16:00, Brendan Richardson wrote: > If you use input > egrep "[^\\n\\t]" file > > and the file contains a line with only n or t on it, those lines are also This is the correct behavior. The command you mention is equivalent to grep -E '[^nt\]' file and this outputs all lines containing some character other than 'n', 't', or '\'. A line containing only n or t should not be output. ------------=_1706495762-7992-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Jan 2024 08:44:27 +0000 Received: from localhost ([127.0.0.1]:56556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rU0m9-00005O-JU for submit@debbugs.gnu.org; Sun, 28 Jan 2024 03:44:27 -0500 Received: from lists.gnu.org ([2001:470:142::17]:60254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTsbo-0001np-0Z for submit@debbugs.gnu.org; Sat, 27 Jan 2024 19:01:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTsbY-0002Sl-VK for bug-grep@gnu.org; Sat, 27 Jan 2024 19:00:56 -0500 Received: from mx0a-002d6a01.pphosted.com ([148.163.151.213]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTsbW-0000hj-3c for bug-grep@gnu.org; Sat, 27 Jan 2024 19:00:56 -0500 Received: from pps.filterd (m0132168.ppops.net [127.0.0.1]) by mx0b-002d6a01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 40RJS9oV013797 for ; Sat, 27 Jan 2024 19:00:50 -0500 Authentication-Results: ppops.net; spf=pass smtp.mailfrom=brichardson@brandeis.edu Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by mx0b-002d6a01.pphosted.com (PPS) with ESMTPS id 3vvy7js04f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sat, 27 Jan 2024 19:00:50 -0500 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2cf3534b797so11358241fa.0 for ; Sat, 27 Jan 2024 16:00:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brandeis.edu; s=google; t=1706400047; x=1707004847; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=u8nrnYjmdxuApq/sOC4R+/GM58LDXiBPZWCmsQyndg0=; b=mepib3yrSIaznEZojWP2MsJT+HqM4Am1r6Is3z3xuM8uMfi026tMVZb0j62js1028A Hp9zgYJK5YvRucYpBt3WP3eCfJO/x050LcUIAyOaoJNGxcxTWmku+jPxqGdWRH8btlEO OQYHh8HARb87FuaPT5p2UfIyQ88cevRGvAJko= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706400047; x=1707004847; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=u8nrnYjmdxuApq/sOC4R+/GM58LDXiBPZWCmsQyndg0=; b=TqUEZVe9mGy7vLTOV9CJppSermCvcIUogO8mP7XxVdYEL1I2P5zyk0oyMYRNpnqaLu Y9ybxwxcm/00xz0VMqJa7XJsBnMTql5znT29v9TnYeSqP9lN0EKDNsp3g+nXNC1kr0V3 WGFkcr8oSOGDT6ErIPoxsPfn04+w1Wf5MaixpNUNUnh9Jn9Yn6ftRlOjTclJMnomSFEY aLAcjQztIakjFYR/u5aNzOHa5Ox1fE/jIlM2tngTXjKfjgF+htAjn8EzYtZBYkRqVoI3 4xNWOnblZmu4qm9k9NzcWgmNC9bsXCu7VqVDmzZ+hnUOT0XCJDB1wXR/aneV063UxfS7 c3wg== X-Gm-Message-State: AOJu0YwD4pDBQOOvucTmcJAgRxcn/dFGz666pz3MjvNBN7tCb7gCAVtB 4ZekNMuXuY6dB4YOjRGHS8umCSdi6HP40rSc4OME/sCbiWvGqpelYlSbgLX9U3OmLAnHV7sxQ6E sEHm9XHbcJi0ONPRv1xleYYo2B4RGARKQsHnnjjOmXKpaWfa/5Dn4+2j81TQi6QQYNxRu9wcNnT 41HGgh4T6/4Rqf/+xId/P5QBfc5QU= X-Received: by 2002:a05:651c:c8d:b0:2cd:dc68:829b with SMTP id bz13-20020a05651c0c8d00b002cddc68829bmr2127844ljb.23.1706400047559; Sat, 27 Jan 2024 16:00:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzN/6aiJShL7uDtctLS6iI5OzrdPNKYY8v0lZH5FCdOPPxaCWAWB0RBLdXehRy+4h9kWE/pKC+gD0O9fWfdiE= X-Received: by 2002:a05:651c:c8d:b0:2cd:dc68:829b with SMTP id bz13-20020a05651c0c8d00b002cddc68829bmr2127838ljb.23.1706400047180; Sat, 27 Jan 2024 16:00:47 -0800 (PST) MIME-Version: 1.0 From: Brendan Richardson Date: Sat, 27 Jan 2024 19:00:37 -0500 Message-ID: Subject: bug with escape characters in pattern To: bug-grep@gnu.org Content-Type: multipart/alternative; boundary="000000000000a8438e060ff63856" X-Proofpoint-ORIG-GUID: ThsAcswQxPj5NXe6f6nYgNNK84wdBy4l X-Proofpoint-GUID: ThsAcswQxPj5NXe6f6nYgNNK84wdBy4l X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 impostorscore=0 phishscore=0 mlxlogscore=277 spamscore=0 malwarescore=0 clxscore=1011 lowpriorityscore=0 priorityscore=1501 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401270182 Received-SPF: pass client-ip=148.163.151.213; envelope-from=brichardson@brandeis.edu; helo=mx0a-002d6a01.pphosted.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 28 Jan 2024 03:44:20 -0500 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 (-) --000000000000a8438e060ff63856 Content-Type: text/plain; charset="UTF-8" Hello, If you use input egrep "[^\\n\\t]" file and the file contains a line with only n or t on it, those lines are also excluded file normal lines tttttt nnnnn KR Brendan Richardson --000000000000a8438e060ff63856 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

If you use input
egrep= "[^\\n\\t]" file

and the file conta= ins a line with only n or t on it, those lines are also excluded
= file
normal lines
tttttt
nnnnn

=


KR
Brendan Richardson
--000000000000a8438e060ff63856-- ------------=_1706495762-7992-1--