10000 [3.13] gh-133286: add explanation about `seq` for pathlib Pattern Lan… · python/cpython@8077e22 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8077e22

Browse files
[3.13] gh-133286: add explanation about seq for pathlib Pattern Language (GH-133340) (#134106)
gh-133286: add explanation about `seq` for pathlib Pattern Language (GH-133340) (cherry picked from commit ac8df4b) Co-authored-by: alexey semenyuk <alexsemenyuk88@gmail.com>
1 parent 2a029a7 commit 8077e22

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
@@ -1661,9 +1661,12 @@ The following wildcards are supported in patterns for
16611661
``?``
16621662
Matches one non-separator character.
16631663
``[seq]``
1664-
Matches one character in *seq*.
1664+
Matches one character in *seq*, where *seq* is a sequence of characters.
1665+
Range expressions are supported; for example, ``[a-z]`` matches any lowercase ASCII letter.
1666+
Multiple ranges can be combined: ``[a-zA-Z0-9_]`` matches any ASCII letter, digit, or underscore.
1667+
16651668
``[!seq]``
1666-
Matches one character not in *seq*.
1669+
Matches one character not in *seq*, where *seq* follows the same rules as above.
16671670

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

0 commit comments

Comments
 (0)
0