#24108: Update fnmatch.translate example to show correct output.
Patch by Merlijn van Deen.
This commit is contained in:
parent
6d877ef026
commit
4590c3d944
|
@ -83,7 +83,7 @@ patterns.
|
|||
>>>
|
||||
>>> regex = fnmatch.translate('*.txt')
|
||||
>>> regex
|
||||
'.*\\.txt$'
|
||||
'.*\\.txt\\Z(?ms)'
|
||||
>>> reobj = re.compile(regex)
|
||||
>>> reobj.match('foobar.txt')
|
||||
<_sre.SRE_Match object; span=(0, 10), match='foobar.txt'>
|
||||
|
|
Loading…
Reference in New Issue