I want to parse string which has length & precision in it eg:'(10,2)' and I need to take out length & precision.
Need output as:
_len = 10, _pre = 2
I tried below but it's not working,
>>> import re
>>> my_str = 'numeric(10,2)'
>>> m = re.match(r'\d+,\d+', my_str)
>>> m
>>> m = re.match(r'(\d+,\d+)', my_str)
>>> m
>>> m = re.match('\((+d),(+d)\)', my_str)
>>> m = re.match('\((+d),(+d)\)', my_str)
Traceback (most recent call last):