GNU bug report logs - #46802
grep (GNU grep) 3.6 RexEx range reversed.

Previous Next

Package: grep;

Reported by: "Georgi K." <strammer <at> abv.bg>

Date: Fri, 26 Feb 2021 17:57:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46802 in the body.
You can then email your comments to 46802 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#46802; Package grep. (Fri, 26 Feb 2021 17:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Georgi K." <strammer <at> abv.bg>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Fri, 26 Feb 2021 17:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Georgi K." <strammer <at> abv.bg>
To: bug-grep <at> gnu.org
Subject: grep (GNU grep) 3.6 RexEx range reversed.
Date: Fri, 26 Feb 2021 19:29:44 +0200 (EET)
[Message part 1 (text/plain, inline)]
 Dear Grep team,  
  
  My installation of grep thinks [a-Z] is a valid range, while [A-z] is not.  
  OS:  ArcoLinux  
  Kernel Version:
5.11.1-zen1-1-zen  
  Grep Version:
  grep (GNU grep) 3.6  
  Shell Version:
GNU bash, version 5.1.4(1)-release (x86_64-pc-linux-gnu)
  
  Locale:
en_US.utf8  
  Steps to reproduce:  
  $ echo "test" | grep -E "[a-Z]"
test
  
 $ echo "test" | grep -E "[A-z]"
 grep: Invalid range end  
  Please, let me know if I can produce some debug log for you.  
  
  Best,  
  George
 
[Message part 2 (text/html, inline)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Fri, 26 Feb 2021 20:21:02 GMT) Full text and rfc822 format available.

Notification sent to "Georgi K." <strammer <at> abv.bg>:
bug acknowledged by developer. (Fri, 26 Feb 2021 20:21:02 GMT) Full text and rfc822 format available.

Message #10 received at 46802-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: "Georgi K." <strammer <at> abv.bg>
Cc: 46802-done <at> debbugs.gnu.org
Subject: Re: bug#46802: grep (GNU grep) 3.6 RexEx range reversed.
Date: Fri, 26 Feb 2021 12:20:41 -0800
On 2/26/21 9:29 AM, Georgi K. wrote:
>    My installation of grep thinks [a-Z] is a valid range, while [A-z] is not.

That's because 'a' collates before 'Z' in your locale, but 'A' does not 
collate before 'z'. If that's not what you want you can change your 
locale, e.g., by setting LC_ALL="C" in your environment.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 27 Mar 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.