|
@@ -95,10 +95,10 @@ class Sum(ioex.calcex.Figure):
|
|
currency_regex = r"[^\d\s-]+"
|
|
currency_regex = r"[^\d\s-]+"
|
|
|
|
|
|
sum_regex = [
|
|
sum_regex = [
|
|
- r'^\$?(?P<value>{}) (?P<curr>{})$'.format(
|
|
+ r'^\$?(?P<value>{}) (?P<currency>{})$'.format(
|
|
value_regex, currency_regex,
|
|
value_regex, currency_regex,
|
|
),
|
|
),
|
|
- r'^(?P<curr>{}) ?(?P<value>{})$'.format(
|
|
+ r'^(?P<currency>{}) ?(?P<value>{})$'.format(
|
|
currency_regex, value_regex,
|
|
currency_regex, value_regex,
|
|
),
|
|
),
|
|
]
|
|
]
|
|
@@ -116,7 +116,7 @@ class Sum(ioex.calcex.Figure):
|
|
attr = match.groupdict()
|
|
attr = match.groupdict()
|
|
return Sum(
|
|
return Sum(
|
|
value=locale.atof(attr['value']),
|
|
value=locale.atof(attr['value']),
|
|
- currency=attr['curr'],
|
|
+ currency=attr['currency'],
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|