Issue #22493: Updated an example for fnmatch.translate().
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 27 Oct 2016 19:44:03 +0000 (22:44 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 27 Oct 2016 19:44:03 +0000 (22:44 +0300)
Doc/library/fnmatch.rst

index 85ac4849653f6b53b5e4e1eb820c80b2205d54d4..3298fc85501583b56e0b3f9c256bac0884949b36 100644 (file)
@@ -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'>