mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
[3.14] gh-133286: add explanation about seq
for pathlib Pattern Language (GH-133340) (#134105)
gh-133286: add explanation about `seq` for pathlib Pattern Language (GH-133340)
(cherry picked from commit ac8df4b589
)
Co-authored-by: alexey semenyuk <alexsemenyuk88@gmail.com>
This commit is contained in:
parent
2d00484f30
commit
c8dcde4d5e
1 changed files with 5 additions and 2 deletions
|
@ -1781,9 +1781,12 @@ The following wildcards are supported in patterns for
|
||||||
``?``
|
``?``
|
||||||
Matches one non-separator character.
|
Matches one non-separator character.
|
||||||
``[seq]``
|
``[seq]``
|
||||||
Matches one character in *seq*.
|
Matches one character in *seq*, where *seq* is a sequence of characters.
|
||||||
|
Range expressions are supported; for example, ``[a-z]`` matches any lowercase ASCII letter.
|
||||||
|
Multiple ranges can be combined: ``[a-zA-Z0-9_]`` matches any ASCII letter, digit, or underscore.
|
||||||
|
|
||||||
``[!seq]``
|
``[!seq]``
|
||||||
Matches one character not in *seq*.
|
Matches one character not in *seq*, where *seq* follows the same rules as above.
|
||||||
|
|
||||||
For a literal match, wrap the meta-characters in brackets.
|
For a literal match, wrap the meta-characters in brackets.
|
||||||
For example, ``"[?]"`` matches the character ``"?"``.
|
For example, ``"[?]"`` matches the character ``"?"``.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue