I have tried this command in python console:
re.match('^\<.+\>([\w\s-,]+)\<.+\>$', 'Carrier-A')
and I got:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/re.py", line 141, in match
return _compile(pattern, flags).match(string)
File "/usr/lib/python2.7/re.py", line 251, in _compile
raise error, v # invalid expression
sre_constants.error: bad character range
but when I use:
re.match('^\<.+\>([\w\s,-]+)\<.+\>$', 'Carrier-A')
no error is being returned.
What is it that I should consider about character sequences?
\sis itself a range of characters, so you can not use it as a start or end character range, check my answer to understand more thoroughly.