Convert all remaining *simple* cases of regex usage to re usage.

This commit is contained in:
Guido van Rossum 1997-10-22 21:00:49 +00:00
parent 426916e50e
commit 9694fcab53
23 changed files with 134 additions and 144 deletions

View file

@ -2,7 +2,7 @@
import os
import fnmatch
import regex
import re
def glob(pathname):
@ -50,7 +50,7 @@ def glob1(dirname, pattern):
return result
magic_check = regex.compile('[*?[]')
magic_check = re.compile('[*?[]')
def has_magic(s):
return magic_check.search(s) >= 0
return magic_check.search(s) is not None