Skip to content

Commit 21749e9

Browse files
authored
Clarifed Glob expressions spec (#67)
1 parent cf6fb9f commit 21749e9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

index.rst

+8-3
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,19 @@ special characters for wildcard matching:
167167
* - ``?``
168168
- any single character, except path separators (``/``)
169169
* - ``[seq]``
170-
- any single character in seq
170+
- any single character in seq. Any character inside those brackets is
171+
considered literally. It means, that pattern ``[ab*c{1..2}]`` is considered literally:
172+
either 'a', or 'b', or '*', or 'c', or '{', or '1', or '.', or '2', or '}'.
171173
* - ``[!seq]``
172-
- any single character not in seq
174+
- any single character not in seq. Any character inside those brackets is
175+
considered literally as well (see example above).
173176
* - ``{s1,s2,s3}``
174177
- any of the strings given (separated by commas, can be nested) (But ``{s1}`` only matches ``{s1}`` literally.)
175178
* - ``{num1..num2}``
176179
- any integer numbers between ``num1`` and ``num2``, where ``num1`` and ``num2``
177-
can be either positive or negative
180+
can be either positive or negative. ``num1`` is required to be
181+
less than ``num2``. For instance, ``{1..3}``, ``{-1..4}`` are valid, but ``{-4..-5}``,
182+
``{3..1}`` are not.
178183

179184
If the glob contains a path separator (a ``/`` not inside square brackets), then the glob is relative
180185
to the directory level of the particular `.editorconfig` file itself.

0 commit comments

Comments
 (0)