Issue #22493: Updated an example for fnmatch.translate().
This commit is contained in:
commit
df12b7f1c5
|
@ -82,7 +82,7 @@ patterns.
|
||||||
>>>
|
>>>
|
||||||
>>> regex = fnmatch.translate('*.txt')
|
>>> regex = fnmatch.translate('*.txt')
|
||||||
>>> regex
|
>>> regex
|
||||||
'.*\\.txt\\Z(?ms)'
|
'(?s:.*\\.txt)\\Z'
|
||||||
>>> reobj = re.compile(regex)
|
>>> reobj = re.compile(regex)
|
||||||
>>> reobj.match('foobar.txt')
|
>>> reobj.match('foobar.txt')
|
||||||
<_sre.SRE_Match object; span=(0, 10), match='foobar.txt'>
|
<_sre.SRE_Match object; span=(0, 10), match='foobar.txt'>
|
||||||
|
|
Loading…
Reference in New Issue