URL:
<http://savannah.gnu.org/bugs/?30327>
Summary: regex ranges [A-Z] and [a-z] ignore case.
Project: findutils
Submitted by: None
Submitted on: Fri 02 Jul 2010 04:01:40 PM UTC
Category: find
Severity: 3 - Normal
Item Group: Wrong result
Status: None
Privacy: Public
Assigned to: None
Originator Name: Alexandre de Verteuil
Originator Email: [email protected]
Open/Closed: Open
Discussion Lock: Any
Release: 4.4.2
Fixed Release: None
_______________________________________________________
Details:
In the following list of files:
test.Jpeg
test.MPEG
test.JPEG
test.Mpeg
test.mpg
test.MPG
test.jpg
test.JPG
I want to find any files with an extension containing uppercases (the point
is to then rename them to lowercase).
This works :
find . -regex '.*\.[ABCDEFGHIJKLMNOPQRSTUVWZYZ][a-Z]+$'
find . -regex '.*\.[JM][a-Z]+$'
This returns all of the files, including those who do not have upper cases in
them :
find . -regex '.*\.[A-Z][a-Z]+$'
Therefore I believe [A-Z] and [a-z] do not work as they are supposed to.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?30327>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/