findRe now returns empty string instead of None
This commit is contained in:
parent
f4bb9d7fff
commit
ee5afb5233
1 changed files with 2 additions and 3 deletions
|
@ -8,10 +8,9 @@ def findRe(string, regexp):
|
||||||
result = re.compile(regexp, re.DOTALL).findall(string)
|
result = re.compile(regexp, re.DOTALL).findall(string)
|
||||||
if result:
|
if result:
|
||||||
return result[0].strip()
|
return result[0].strip()
|
||||||
return None
|
return ''
|
||||||
|
|
||||||
def findRegexp(string, regexp):
|
findRegexp = findRe
|
||||||
return findRe(string, regexp)
|
|
||||||
|
|
||||||
def findString(string, string0='', string1 = ''):
|
def findString(string, string0='', string1 = ''):
|
||||||
"""Return the string between string0 and string1.
|
"""Return the string between string0 and string1.
|
||||||
|
|
Loading…
Reference in a new issue