8000 gh-133286: add explanation about `seq` for pathlib Pattern Language (… · python/cpython@ac8df4b · GitHub
[go: up one dir, main page]

Skip to content

Commit ac8df4b

Browse files
gh-133286: add explanation about seq for pathlib Pattern Language (#133340)
1 parent b5febf7 commit ac8df4b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Doc/library/pathlib.rst

+5-2
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