Kaydet (Commit) e0a220e9 authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Issue #22493: Updated an example for fnmatch.translate().

üst 31c80e8e
...@@ -82,7 +82,7 @@ patterns. ...@@ -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'>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment