adding findRe, deprecating findRegexp
This commit is contained in:
parent
6861269959
commit
f4bb9d7fff
1 changed files with 4 additions and 1 deletions
|
@ -4,12 +4,15 @@
|
|||
import re
|
||||
|
||||
|
||||
def findRegexp(string, regexp):
|
||||
def findRe(string, regexp):
|
||||
result = re.compile(regexp, re.DOTALL).findall(string)
|
||||
if result:
|
||||
return result[0].strip()
|
||||
return None
|
||||
|
||||
def findRegexp(string, regexp):
|
||||
return findRe(string, regexp)
|
||||
|
||||
def findString(string, string0='', string1 = ''):
|
||||
"""Return the string between string0 and string1.
|
||||
|
||||
|
|
Loading…
Reference in a new issue