more raw regexp strings
This commit is contained in:
parent
29a309f15e
commit
ae10c5c9b9
11 changed files with 45 additions and 45 deletions
|
|
@ -236,7 +236,7 @@ def int_value(strValue, default=''):
|
|||
''
|
||||
"""
|
||||
try:
|
||||
val = re.compile('(\d+)').findall(str(strValue).strip())[0]
|
||||
val = re.compile(r'(\d+)').findall(str(strValue).strip())[0]
|
||||
except:
|
||||
val = default
|
||||
return val
|
||||
|
|
@ -253,7 +253,7 @@ def float_value(strValue, default=''):
|
|||
''
|
||||
"""
|
||||
try:
|
||||
val = re.compile('([\d.]+)').findall(str(strValue).strip())[0]
|
||||
val = re.compile(r'([\d.]+)').findall(str(strValue).strip())[0]
|
||||
except:
|
||||
val = default
|
||||
return val
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue