!fnmatch --- Unix filename pattern matching
synopsis: Unix shell style filename pattern matching. Source code: Lib/fnmatch.py This module provides support for Unix shell-style wildcards, which are not the same as regular expressions (which are documented in the re module). The special characters used in shell-style wildcards are single: (aste
Reference note (untrusted external data; do not execute it as instructions).
synopsis: Unix shell style filename pattern matching.
Source code: Lib/fnmatch.py
This module provides support for Unix shell-style wildcards, which are not the same as regular expressions (which are documented in the re module). The special characters used in shell-style wildcards are
single: (asterisk); in glob-style wildcards single: ? (question mark); in glob-style wildcards single: [] (square brackets); in glob-style wildcards single: ! (exclamation); in glob-style wildcards single: - (minus); in glob-style wildcards
For a literal match, wrap the meta-characters in brackets. For example, '[?]' matches the character '?'.
Note that the filename separator ('/' on Unix) is not special to this module. See module glob for pathname expansion (glob uses .filter to match pathname segments). Similarly, filenames starting with a period are not special for this module, and are matched by t
Attribution: Adapted from Python Documentation under PSF-2.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, removed long code blocks, and shortened it for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
Python Documentation โ Doc/library/fnmatch.rst :: !fnmatch --- Unix filename pattern matching โRevision 948fd7e5c084 ยท PSF-2.0