mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Issue #22493: Updated an example for fnmatch.translate().
This commit is contained in:
parent
31c80e8eae
commit
e0a220e9e2
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue