Once more?

This commit is contained in:
Kepoor Hampond 2017-06-10 18:43:42 -07:00
parent 5d2537b236
commit fa64378c2b

View file

@ -98,7 +98,10 @@ class ObjManip: # Object Manipulation
def blank(string, downcase=True):
import re
regex = re.compile('[^a-zA-Z0-9\ ]')
string = regex.sub('', string.decode("utf8"))
if sys.version_info == 2:
string = regex.sub('', string.decode("utf8"))
else:
string = regex.sub('', string)
if downcase:
string = string.lower()
return ' '.join(string.decode().split())