8000 [3.14] gh-133286: add explanation about `seq` for pathlib Pattern Language (GH-133340) by miss-islington · Pull Request #134105 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
8000

[3.14] gh-133286: add explanation about seq for pathlib Pattern Language (GH-133340) #134105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1781,9 +1781,12 @@ The following wildcards are supported in patterns for
``?``
Matches one non-separator character.
``[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]``
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 example, ``"[?]"`` matches the character ``"?"``.
Expand Down
Loading
0