From unknown Sat Jun 21 17:26:01 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#19953 <19953@debbugs.gnu.org> To: bug#19953 <19953@debbugs.gnu.org> Subject: Status: egrep: 'Invalid range end' - bug or not? Reply-To: bug#19953 <19953@debbugs.gnu.org> Date: Sun, 22 Jun 2025 00:26:01 +0000 retitle 19953 egrep: 'Invalid range end' - bug or not? reassign 19953 coreutils submitter 19953 George Shuklin severity 19953 normal tag 19953 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 26 08:29:10 2015 Received: (at submit) by debbugs.gnu.org; 26 Feb 2015 13:29:10 +0000 Received: from localhost ([127.0.0.1]:58323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQyV4-0003bx-Dc for submit@debbugs.gnu.org; Thu, 26 Feb 2015 08:29:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55668) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQyV2-0003bi-4g for submit@debbugs.gnu.org; Thu, 26 Feb 2015 08:29:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQyUw-00086k-4p for submit@debbugs.gnu.org; Thu, 26 Feb 2015 08:29:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQyUw-00086g-2n for submit@debbugs.gnu.org; Thu, 26 Feb 2015 08:29:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQyUv-0002vu-AS for bug-coreutils@gnu.org; Thu, 26 Feb 2015 08:29:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQyUq-000821-3Z for bug-coreutils@gnu.org; Thu, 26 Feb 2015 08:29:01 -0500 Received: from mail-we0-x231.google.com ([2a00:1450:400c:c03::231]:33354) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQyUp-00081f-UI for bug-coreutils@gnu.org; Thu, 26 Feb 2015 08:28:56 -0500 Received: by wevk48 with SMTP id k48so10735578wev.0 for ; Thu, 26 Feb 2015 05:28:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=RMMO3/tdxDxkZl2x+R9mLr6dWmRCaJ4tRNWngEZTlDU=; b=UDxqhuaqmF1lXB07WqM+RrrShmXQaE9dBARjRtgbyb76rZAo8QOBRsp533zeFH60uP 0nRNXCr8U4IsHhPaNn3Hr918XIyzPSOPRyQLFpeKPXBidk5iClBDkYQFVkCLovHyeBvI FchRNZrpE+TOyVH7AXZk0TV1N1lBItYuqifZNMfM0sgn+B2gvXzcQCeNuNy6fzEKVg8g nZzTB1UhVKK/3/rpHwR/V9BjSiGQ8YeJSMN4JCE/RfCORYk7aUXMgIwQQzzZYmUm3wPp UIu9paWnF+3C4C5ryWPwhrnInNKsmQnmzRvHnv/OeUt15mNG1+h27b1AxmAy+PgDcvKw GxaA== X-Received: by 10.194.174.164 with SMTP id bt4mr11277983wjc.7.1424957334623; Thu, 26 Feb 2015 05:28:54 -0800 (PST) Received: from [192.168.0.68] (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by mx.google.com with ESMTPSA id lj13sm2847066wic.9.2015.02.26.05.28.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Feb 2015 05:28:53 -0800 (PST) Message-ID: <54EF1F93.50801@gmail.com> Date: Thu, 26 Feb 2015 15:28:51 +0200 From: George Shuklin User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: egrep: 'Invalid range end' - bug or not? Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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.0 (----) 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.0 (----) $ echo 'sample-text'|egrep '[0-9\-a-z]' grep: Invalid range end but: $ echo 'sample-text'|egrep '[0-9a-z\-]' sample-text (grep 2.20-4.1) From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 26 09:50:31 2015 Received: (at 19953) by debbugs.gnu.org; 26 Feb 2015 14:50:31 +0000 Received: from localhost ([127.0.0.1]:58392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQzlh-0005hd-Jo for submit@debbugs.gnu.org; Thu, 26 Feb 2015 09:50:30 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:60233) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQzlf-0005hP-CB for 19953@debbugs.gnu.org; Thu, 26 Feb 2015 09:50:23 -0500 Received: from [10.0.4.15] ([62.153.148.194]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0McvJJ-1Y9Bvt2iq9-00Hyv4; Thu, 26 Feb 2015 15:50:16 +0100 Message-ID: <54EF32A8.3000301@bernhard-voelker.de> Date: Thu, 26 Feb 2015 15:50:16 +0100 From: Bernhard Voelker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: George Shuklin , 19953@debbugs.gnu.org Subject: Re: bug#19953: egrep: 'Invalid range end' - bug or not? References: <54EF1F93.50801@gmail.com> In-Reply-To: <54EF1F93.50801@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:SbBH2Nx5uqRK3ABIvioXjTXkqI4bfnDB1YCpIHRx/I+6V0WT1Fh 8yf2cwn/1k0y2aARkRXhxfhgkaf+MgaxZtid6WiWBy2cYy46jdcEFGIfMgX69qqfKhaSSIm Yowjw9RVL+iY37g2I7ReVWJ2NzB31f9rEcZWxhFgNuyQrv1fonXFppUV5h32D2KRYiBQNjP UcYcGPgMZLoOOyZ8M0ElQ== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19953 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.0 (/) tag 19953 notabug close 19953 stop On 02/26/2015 02:28 PM, George Shuklin wrote: > $ echo 'sample-text'|egrep '[0-9\-a-z]' > grep: Invalid range end > > but: > > $ echo 'sample-text'|egrep '[0-9a-z\-]' > sample-text > > (grep 2.20-4.1) Thanks for the bug report, however you reached the wrong list (bug-coreutils@...): $ egrep --help | grep bug Report bugs to: bug-grep@gnu.org Feel free to report this there. Meanwhile, I'm closing this as "notabug" here. Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 26 10:06:14 2015 Received: (at 19953) by debbugs.gnu.org; 26 Feb 2015 15:06:14 +0000 Received: from localhost ([127.0.0.1]:58839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YR00w-0006Au-KR for submit@debbugs.gnu.org; Thu, 26 Feb 2015 10:06:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55444) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YR00r-0006Ah-Aw for 19953@debbugs.gnu.org; Thu, 26 Feb 2015 10:06:09 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1QF63pG023970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Feb 2015 10:06:04 -0500 Received: from [10.3.113.127] (ovpn-113-127.phx2.redhat.com [10.3.113.127]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1QF63fa014175; Thu, 26 Feb 2015 10:06:03 -0500 Message-ID: <54EF365A.1080004@redhat.com> Date: Thu, 26 Feb 2015 08:06:02 -0700 From: Eric Blake Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: George Shuklin , 19953@debbugs.gnu.org Subject: Re: bug#19953: egrep: 'Invalid range end' - bug or not? References: <54EF1F93.50801@gmail.com> In-Reply-To: <54EF1F93.50801@gmail.com> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2nAAsmChBSwQFVRkVmHcWhKClJ0mBsO4E" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 19953 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: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2nAAsmChBSwQFVRkVmHcWhKClJ0mBsO4E Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/26/2015 06:28 AM, George Shuklin wrote: > $ echo 'sample-text'|egrep '[0-9\-a-z]' > grep: Invalid range end There are different regex flavors. Some, like perl, allow you to write [...\-...] to include a literal '-' in the middle of a larger set of characters. But others, like the POSIX BRE (basic) and ERE (extended) flavors do not. In these flavors, the ONLY way to include literal '-' in a character set is to put it at the front or at the back of the set being enumerated. Any appearance of '\' in the set is taken literally; there is no way to use '\' as an escape character. Thus, your attempt here is requesting the set consisting of the range from '0' to '9', from '\' to 'a', and then an unexpected '-' character that is not the end. It is invalid per POSIX. >=20 > but: >=20 > $ echo 'sample-text'|egrep '[0-9a-z\-]' This requests the set from '0' to '0', the set from 'a' to 'z', the literal '\', and the literal '-'. As Bernhard pointed out, this is not a coreutils bug. But it is also not a grep bug. It is your usage that is at fault. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --2nAAsmChBSwQFVRkVmHcWhKClJ0mBsO4E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU7zZaAAoJEKeha0olJ0Nq7J0H/2RYof2ZIv9KjndiKodu5uzB fWjep+rpzLyNggB8+l/JDgbVNHiLYzvbkwEZqeFA508Sb56gvUIXvHrliAJUaP5c Nbe5CBDA9pxKkKjieTr918o8z3MTFAl9p9E5lbNyGXP2ycWRVR8XJ947j+c5Pzst 96Xb66WB0X7EJMq/Hj9xIyxpQlAxG15NYTwiH9ahBjhZIdFDMMjNicfyNwIzdba7 iBZj/ltQHvBlhEIX7TkfjDCrBlRsjZj88Ip5K+9CCfwgIXKb189tptXkVQJk2fms h1hcL5whMeFXUKIjKfNBR/sxZqU9H3kQMF+AEJicgMSYXHxMsnlm52vfUgBWjyM= =vL2F -----END PGP SIGNATURE----- --2nAAsmChBSwQFVRkVmHcWhKClJ0mBsO4E-- From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 22 21:49:00 2018 Received: (at control) by debbugs.gnu.org; 23 Oct 2018 01:49:00 +0000 Received: from localhost ([127.0.0.1]:36606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEloZ-0003yG-Pi for submit@debbugs.gnu.org; Mon, 22 Oct 2018 21:48:59 -0400 Received: from mail-it1-f169.google.com ([209.85.166.169]:55854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEloY-0003xq-0s for control@debbugs.gnu.org; Mon, 22 Oct 2018 21:48:58 -0400 Received: by mail-it1-f169.google.com with SMTP id c23-v6so34285itd.5 for ; Mon, 22 Oct 2018 18:48:57 -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=TONnNMhJqrA5WQokD+KBhVxjlCHGzcSSjmZUiwymn/s=; b=JJNSfnZJ26xyh1wLkSs9OsAQvf1x7bif6iSyGL9/QDiuIM7D4Ze4mQQeWdp1fEsaoJ TQQOTVXXLjJo29Augks1Gk6HMujsJkqudBddiaOdjQNRuQet5WOJkCTnRvRyXABLILKO VKDpRryA/0cGt159WIDJDdltLZCBz9SVUEHR0RA9o5zWd5d/76cuJ0lywrqACsGs+A/I oKKYFEHpeJhf12rgVEvncRJ/2YJQb1t4jLcBIvMqgYpmh+FZ5Vulad85ObA5LFSNZEvy lcr/PlIwQir0wmpYGM1ds/8/UCqqQgEXVlXC8WzfDL2gpBNgm3VfPU1a2KGelVLXvOIF Lyhw== 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=TONnNMhJqrA5WQokD+KBhVxjlCHGzcSSjmZUiwymn/s=; b=pnZsHqQQODJUBLmX++tqCk1Hv3cICq1DPdnDo7qjT7e96wdU1Glh5Z85iYtOSoliT5 fnY2TRLA4Df3sVG2P5/2OkX6VE2Z9hb0KpLJaC+uKarNYgmYdgZfHXp3TXVh6dGyVlo4 ZICkugbqCvS4NPvc1oPpOTldQRCVVou11uvh/kqbuxetyp29bHt7tNB3gQIJj7JURDe7 AFqcixTEQXK3mhaG9/QWsJrpdmWwOl0+j3eaafOuWltGqjk+aUrR7vw0lKHd8BF5ijEH Z4K1/LfEoxrpiYvEIO/3ajcvcQ+am8D0SR30xvGyJUusLbtI/wq3c9L/FBDRMmHstaDs krcQ== X-Gm-Message-State: ABuFfoiYof45mTVF7vqJ/8LfdrqjRX73o8u+GsfVMSwOlobsntB4gyBy HVLy99O/2ZtnXh9M6oOxpJoBOuaO X-Google-Smtp-Source: ACcGV62JkqsUP7qqZgi40o20Rtsbj9X7eVJmS03ywZyE5LEnArR5IFTqZbOVnVjSGbJEx/kd/FBvIg== X-Received: by 2002:a02:98d3:: with SMTP id c19-v6mr3441469jak.47.1540259332039; Mon, 22 Oct 2018 18:48:52 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id d75-v6sm7134itc.41.2018.10.22.18.48.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Oct 2018 18:48:50 -0700 (PDT) To: control@debbugs.gnu.org From: Assaf Gordon Message-ID: Date: Mon, 22 Oct 2018 19:48:49 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 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 19953 notabug close 19953 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.166.169 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.169 listed in wl.mailspike.net] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject 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 19953 notabug close 19953 From unknown Sat Jun 21 17:26:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 20 Nov 2018 12:24:08 +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