56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
-
-
-
-
-
-
-
-
-
-
-
-
-
|
[^...] Matches one character not in the enclosed list.
Special character sequences have some additional features:
* A range of characters may be specified with `-`, so `[a-d]` matches
exactly the same characters as `[abcd]`. Ranges reflect Unicode
code points without any locale-specific collation sequence.
* Include `-` in a list by placing it last, just before the `]`.
* Include `]` in a list by making the first character after the `[` or
`[^`. At any other place, `]` ends the list.
* Include `^` in a list by placing anywhere except first after the
`[`.
* Beware that ranges in lists may include more than you expect:
`[A-z]` Matches `A` and `Z`, but also matches `a` and some less
obvious characters such as `[`, `\`, and `]` with code point
values between `Z` and `a`.
* Beware that a range must be specified from low value to high
value: `[z-a]` does not match any character at all, preventing the
entire glob from matching.
* Note that unlike typical Unix shell globs, wildcards (`*`, `?`,
and character lists) are allowed to match `/` directory
separators as well as the initial `.` in the name of a hidden
file or directory.
Some examples of character lists:
* `[a-d]` Matches any one of `a`, `b`, `c`, or `d` but not `รค`;
* `[^a-d]` Matches exactly one character other than `a`, `b`, `c`,
or `d`;
* `[0-9a-fA-F]` Matches exactly one hexadecimal digit;
* `[a-]` Matches either `a` or `-`;
* `[][]` Matches either `]` or `[`;
* `[^]]` Matches exactly one character other than `]`;
* `[]^]` Matches either `]` or `^`; and
* `[^-]` Matches exactly one character other than `-`.
White space means the ASCII characters TAB, LF, VT, FF, CR, and SPACE.
Note that this does not include any of the many additional spacing
characters available in Unicode, and specifically does not include
U+00A0 NO-BREAK SPACE.
|