summaryrefslogtreecommitdiffstats
path: root/Doc/library/fnmatch.rst
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-11-17 15:38:11 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2012-11-17 15:38:11 (GMT)
commita39a22dc0b20f0373792322b054228f1f62b736a (patch)
treefc903072f5fb959b0da2c98f4275f13e65fd448b /Doc/library/fnmatch.rst
parent52e855084dc21fc2ea9a8a4a8c9c0beab6a855c3 (diff)
downloadcpython-a39a22dc0b20f0373792322b054228f1f62b736a.zip
cpython-a39a22dc0b20f0373792322b054228f1f62b736a.tar.gz
cpython-a39a22dc0b20f0373792322b054228f1f62b736a.tar.bz2
#16420: document a way to escape metacharacters in glob/fnmatch.
Diffstat (limited to 'Doc/library/fnmatch.rst')
-rw-r--r--Doc/library/fnmatch.rst5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst
index 4ba6b77..e0434b0 100644
--- a/Doc/library/fnmatch.rst
+++ b/Doc/library/fnmatch.rst
@@ -29,6 +29,9 @@ special characters used in shell-style wildcards are:
| ``[!seq]`` | matches any character not in *seq* |
+------------+------------------------------------+
+For a literal match, wrap the meta-characters in brackets.
+For example, ``'[?]'`` matches the character ``'?'``.
+
.. index:: module: glob
Note that the filename separator (``'/'`` on Unix) is *not* special to this
@@ -74,8 +77,6 @@ patterns.
Return the shell-style *pattern* converted to a regular expression.
- Be aware there is no way to quote meta-characters.
-
Example:
>>> import fnmatch, re