- 论坛徽章:
- 84
|
我试了一下,[a-z]确实不行.但不知道为什么.
那就用这个吧, (POSIX Character Classes)POSIX标准都支持的.
# ll /dev/tty[:lower:]?
[:alnum:] matches alphabetic or numeric characters. This is equivalent to A-Za-z0-9.
[:alpha:] matches alphabetic characters. This is equivalent to A-Za-z.
[:blank:] matches a space or a tab.
[:cntrl:] matches control characters.
[:digit:] matches (decimal) digits. This is equivalent to 0-9.
[:graph:] (graphic printable characters). Matches characters in the range of ASCII 33 - 126. This is the same as [:print:], below, but excluding the space character.
[:lower:] matches lowercase alphabetic characters. This is equivalent to a-z.
[:print:] (printable characters). Matches characters in the range of ASCII 32 - 126. This is the same as [:graph:], above, but adding the space character.
[:space:] matches whitespace characters (space and horizontal tab).
[:upper:] matches uppercase alphabetic characters. This is equivalent to A-Z.
[ digit:] matches hexadecimal digits. This is equivalent to 0-9A-Fa-f |
|