mirror of https://github.com/python/cpython
Issue #22493: Updated an example for fnmatch.translate().
This commit is contained in:
parent
31c80e8eae
commit
e0a220e9e2
|
@ -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'>
|
||||
|
|
Loading…
Reference in New Issue