Originally Posted by Dies
I don't know much about bash or regular expressions so...
But once you say [A-Z]* wouldn't that mean match everything that starts with a capital, seems like anything you put after that * wouldn't even matter since it's already matching any character any number of times.
No, the stuff after the * is not ignored. For example, if you say "ls *.txt" you'd expect the stuff after * to not be ignored. (Trivia: in DOS before NT, the stuff after * on either side of the dot would get ignored, so "dir *a.txt" is the same as "dir *.txt")
Anyways, I found the answer. Like me, you're probably not using C sorting order. I'm using en_us.UTF-8. So it seems [A-Z] actually means [AbBcC.....zZ] which is every letter except lower case 'a'. How completely unintuitive! I've been doing it wrong all these years.