I thought [x-y] matches all characters from ascii code of x to ascii code of y. So, [A-z] should be any characters from 65 to 122. But grep in bash says 'Invalid range' and [a-Z] is correct for all alphabets, which in range from 97 to 90 in ascii code.
How exactly behaves in grep in such a case? And generally, [x-y] is nothing to do with ascii code in regexp?