You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
###################################
$ python test.py
Traceback (most recent call last):
File "test.py", line 9, in <module>
result = re.match(diffitem, line)
File "/usr/lib/python2.7/re.py", line 137, in matchreturn _compile(pattern, flags).match(string)
File "/usr/lib/python2.7/re.py", line 244, in _compileraise error, v # invalid expressionsre_constants.error: multiple repeat
In a regex, '+' is a metacharacter meaning "repeated one or more times".
"libstdc+" will match "libstd" followed by "c" repeated one or more times.
"libstdc++" will match "libstd" followed by "c" repeated one or more times, but then there's another "+", which it takes to mean that you want the repeat to be repeated, hence the exception.
'*' is also a metacharacter, this one meaning "repeated zero or more times".
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: