I have a a regex : ([\w\s()-]+):[\s+\B]?([\d,.]+)
to catch string in format similar to
ignore-packets(vlan) : 49,971
when I run it with python 2.7 it works as expected but when i run it using
Python 2.6.6 (r266:84292, May 1 2012, 13:52:17)
I get the following error:
m = re.findall(r'([\w\s\(\)-]+):[\s+\B]?([\d,\.]+)', l)
File "/usr/lib64/python2.6/re.py", line 177, in findall
return _compile(pattern, flags).findall(string)
File "/usr/lib64/python2.6/re.py", line 245, in _compile
raise error, v # invalid expression
sre_constants.error: internal: unsupported set operator
using the reference I've added '\' before special chars (().) but problem still occur
what am I missing here ?