8000 gh-133286: add explanation about for pathlib Pattern Language · python/cpython@3bb5f7d · GitHub
[go: up one dir, main page]

Skip to content

Commit 3bb5f7d

Browse files
committed
gh-133286: add explanation about for pathlib Pattern Language
1 parent ca12a74 commit 3bb5f7d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Doc/library/pathlib.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,9 +1781,12 @@ The following wildcards are supported in patterns for
17811781
``?``
17821782
Matches one non-separator character.
17831783
``[seq]``
1784-
Matches one character in *seq*.
1784+
Matches one character in *seq*, where *seq* is a sequence of characters.
1785+
Range expressions are supported; for example, ``[a-z]`` matches any lowercase ASCII letter.
1786+
Multiple ranges can be combined: ``[a-zA-Z0-9_]`` matches any ASCII letter, digit, or underscore.
1787+
17851788
``[!seq]``
1786-
Matches one character not in *seq*.
1789+
Matches one character not in *seq*, where *seq* follows the same rules as above.
17871790

17881791
For a literal match, wrap the meta-characters in brackets.
17891792
For example, ``"[?]"`` matches the character ``"?"``.

0 commit comments

Comments
 (0)
0