Fossil SCM

Replace []] example with [][] because a single-character character class is not terribly useful whereas the latter demonstrates the same concept as well as the visibly unusual way to match either bracket. Add example showing how to match a ^ character as well as ], further reinforcing the above.

andy 2017-04-16 00:45 glob-docs
Commit 541e32498932ce747aa778f1fd24dbdd654becb3c70ddd794cf5bc6a9336df94
1 file changed +2 -1
+2 -1
--- www/globs.md
+++ www/globs.md
@@ -41,12 +41,13 @@
4141
4242
Some examples:
4343
4444
[a-d] Matches any one of 'a', 'b', 'c', or 'd'
4545
[a-] Matches either 'a' or '-'
46
- []] Matches exactly one ']' character
46
+ [][] Matches either '[' or ']'
4747
[^]] Matches exactly one character other than ']'
48
+ []^] Matches either ']' or '^'
4849
4950
The glob is compared to the canonical name of the file in the checkout
5051
tree, and must match the entire name to be considered a match.
5152
5253
A list of GLOBs is simply one or more GLOBs separated by whitespace or
5354
--- www/globs.md
+++ www/globs.md
@@ -41,12 +41,13 @@
41
42 Some examples:
43
44 [a-d] Matches any one of 'a', 'b', 'c', or 'd'
45 [a-] Matches either 'a' or '-'
46 []] Matches exactly one ']' character
47 [^]] Matches exactly one character other than ']'
 
48
49 The glob is compared to the canonical name of the file in the checkout
50 tree, and must match the entire name to be considered a match.
51
52 A list of GLOBs is simply one or more GLOBs separated by whitespace or
53
--- www/globs.md
+++ www/globs.md
@@ -41,12 +41,13 @@
41
42 Some examples:
43
44 [a-d] Matches any one of 'a', 'b', 'c', or 'd'
45 [a-] Matches either 'a' or '-'
46 [][] Matches either '[' or ']'
47 [^]] Matches exactly one character other than ']'
48 []^] Matches either ']' or '^'
49
50 The glob is compared to the canonical name of the file in the checkout
51 tree, and must match the entire name to be considered a match.
52
53 A list of GLOBs is simply one or more GLOBs separated by whitespace or
54

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button