Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e0a220e

Browse files
Issue python#22493: Updated an example for fnmatch.translate().
1 parent 31c80e8 commit e0a220e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/library/fnmatch.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ patterns.
8282
>>>
8383
>>> regex = fnmatch.translate('*.txt')
8484
>>> regex
85-
'.*\\.txt\\Z(?ms)'
85+
'(?s:.*\\.txt)\\Z'
8686
>>> reobj = re.compile(regex)
8787
>>> reobj.match('foobar.txt')
8888
<_sre.SRE_Match object; span=(0, 10), match='foobar.txt'>

0 commit comments

Comments
 (0)