projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31c80e8
)
Issue #22493: Updated an example for fnmatch.translate().
author
Serhiy Storchaka
<storchaka@gmail.com>
Thu, 27 Oct 2016 19:44:03 +0000
(22:44 +0300)
committer
Serhiy Storchaka
<storchaka@gmail.com>
Thu, 27 Oct 2016 19:44:03 +0000
(22:44 +0300)
Doc/library/fnmatch.rst
patch
|
blob
|
history
diff --git
a/Doc/library/fnmatch.rst
b/Doc/library/fnmatch.rst
index 85ac4849653f6b53b5e4e1eb820c80b2205d54d4..3298fc85501583b56e0b3f9c256bac0884949b36 100644
(file)
--- a/
Doc/library/fnmatch.rst
+++ b/
Doc/library/fnmatch.rst
@@
-82,7
+82,7
@@
patterns.
>>>
>>> regex = fnmatch.translate('*.txt')
>>> regex
- '
.*\\.txt\\Z(?ms)
'
+ '
(?s:.*\\.txt)\\Z
'
>>> reobj = re.compile(regex)
>>> reobj.match('foobar.txt')
<_sre.SRE_Match object; span=(0, 10), match='foobar.txt'>