rebol lexer: unclosed character class in regex

Issue #1467 new
Thomas Waldmann
created an issue

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['
>>>'\s*REBOL\s*[', text, re.IGNORECASE)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "env/lib/python2.7/", line 146, in search
    return _compile(pattern, flags).search(string)
  File "env/lib/python2.7/", 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.

Comments (1)

  1. Log in to comment