See how it misses the backslash before the square bracket.
Compare to the regex 3 lines above that.
re module does not like that:
>>> text=' REBOL[' >>> re.search(r'\s*REBOL\s*[', text, re.IGNORECASE) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "env/lib/python2.7/re.py", line 146, in search return _compile(pattern, flags).search(string) File "env/lib/python2.7/re.py", line 251, in _compile raise error, v # invalid expression sre_constants.error: unexpected end of regular expression
Issue was found by the pycharm code checker:
"unclosed character class"
Found it in 2.1.3, but it is still there in current code.