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
This is "new" behavior as of py311, possibly earlier. Behavior is the same with built-in re.
$ python
Python 3.11.9 (main, May 26 2024, 09:54:30) [GCC 13.2.1 20240503] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import re2 as re
>>> obj = re.compile(r'(?<!\\\):(.*?)(?<!\\\):')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "compile.pxi", line 6, in re2.compile
File "compile.pxi", line 96, in re2._compile
File "pattern.pxi", line 607, in re2.PythonRePattern.__init__
File "/usr/lib/python3.11/re/__init__.py", line 227, in compile
return _compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/__init__.py", line 294, in _compile
p = _compiler.compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_compiler.py", line 745, in compile
p = _parser.parse(p, flags)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 989, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 464, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 779, in _parse
p = _parse_sub(source, state, verbose, nested + 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 464, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/re/_parser.py", line 784, in _parse
raise source.error("missing ), unterminated subpattern",
re.error: missing ), unterminated subpattern at position 14
>>> obj = re.compile(r'(?<!\\):(.*?)(?<!\\):')
>>>
The text was updated successfully, but these errors were encountered:
This is "new" behavior as of py311, possibly earlier. Behavior is the same with built-in re.
The text was updated successfully, but these errors were encountered: