Fossil

Check-in [8ce3e9a6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:With examples split into their own list, switch back to compacted bullet lists.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | glob-docs
Files: files | file ages | folders
SHA3-256:8ce3e9a66daa2db311e0aec655a3780d3ca2a49dc8a3696094ec29b8b499ea81
User & Date: rberteig 2017-04-20 18:53:16
Context
2017-05-01
13:34
Replaced the Platform Quirks section of the www/globs.md document with a modified version of what I (Warren Young) posted to the mailing list, the differences answering Ross Berteig critiques of the original version. check-in: 0a51f1bf user: wyoung tags: glob-docs
2017-04-20
18:53
With examples split into their own list, switch back to compacted bullet lists. check-in: 8ce3e9a6 user: rberteig tags: glob-docs
18:26
Correct display of character list examples to work around lack of multi-level bulleted lists check-in: 2df14399 user: andygoth tags: glob-docs
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to www/globs.md.

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
    [^...]  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. 








<

<


<


<




<



<









<


<

<

<

<

<

<







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.