GNU bug report logs -
#15524
Inconsistent case-sensitivity behavior
Previous Next
Reported by: Mark H Weaver <mhw <at> netris.org>
Date: Fri, 4 Oct 2013 05:41:02 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#15524: Inconsistent case-sensitivity behavior
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 15524 <at> debbugs.gnu.org.
--
15524: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15524
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
This bug has been fixed in later versions of grep. I can reproduce the
bug with grep 2.8 but not with grep 2.18, the current version.
[Message part 3 (message/rfc822, inline)]
Can anyone explain what's going on here? Why does the regexp "^[a-z]*$"
match the line "FOO"?
Regards,
Mark
--8<---------------cut here---------------start------------->8---
mhw:~$ (echo foo; echo FOO) | grep '[a-z]'
foo
mhw:~$ (echo foo; echo FOO) | grep '^[a-z][a-z][a-z]$'
foo
mhw:~$ (echo foo; echo FOO) | grep '^[a-z]*$'
foo
FOO
mhw:~$ echo $LANG
en_US.UTF-8
mhw:~$ grep --version
grep (GNU grep) 2.8
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
mhw:~$ export
declare -x COLUMNS="125"
declare -x DISPLAY=":0"
declare -x EDITOR="emacsclient"
declare -x EMACS="t"
declare -x HOME="/home/mhw"
declare -x HUSHLOGIN="FALSE"
declare -x HZ="100"
declare -x INPUTRC="/etc/inputrc"
declare -x INSIDE_EMACS="24.3.1,comint"
declare -x LANG="en_US.UTF-8"
declare -x LOGNAME="mhw"
declare -x LYNX_CFG="/home/mhw/lynx.cfg"
declare -x MAIL="/var/mail/mhw"
declare -x OLDPWD="/home/mhw/.local/share/guile/site/2.0"
declare -x PATH="/home/mhw/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
declare -x PS1="\\u:\\w\\\$ "
declare -x PWD="/home/mhw"
declare -x RATPOISON="ratpoison"
declare -x SHELL="/bin/bash"
declare -x SHLVL="4"
declare -x TERM="dumb"
declare -x TERMCAP=""
declare -x USER="mhw"
declare -x WINDOWPATH="7"
declare -x XAUTHORITY="/home/mhw/.Xauthority"
--8<---------------cut here---------------end--------------->8---
I'm using eglibc-2.13. This is on a system I built myself based on
CLFS, but others have reported seeing the same behavior on Ubuntu.
This bug report was last modified 11 years and 82 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.