Issue 3629: Python won't compile a regex that compiles with 2.5.2 and 30b2 (original) (raw)
Here are the results of running the same tiny program against 2.5.2, 30b2, and 30b3. The program creates a regex and tries to match 3 strings. For 2.5.2 and 30b2 this works fine; for 30b3 the regex won't even compile:
$ python -V Python 2.5.2 $ python /tmp/retext.py name="name1" value="value1" name="name2" value="value #2" name="name3" value="value '3'" $ $ ~/opt/python30b2/bin/python3.0 -V Python 3.0b2 $ ~/opt/python30b2/bin/python3.0 /tmp/retext.py name="name1" value="value1" name="name2" value="value #2" name="name3" value="value '3'" $ $ ~/opt/python30b3/bin/python3.0 /tmp/retext.py Traceback (most recent call last): File "/tmp/retext.py", line 8, in """, re.VERBOSE) File "/home/mark/opt/python30b3/lib/python3.0/re.py", line 203, in compile return _compile(pattern, flags) File "/home/mark/opt/python30b3/lib/python3.0/re.py", line 255, in _compile p = sre_compile.compile(pattern, flags) File "/home/mark/opt/python30b3/lib/python3.0/sre_compile.py", line 520, in compile groupindex, indexgroup RuntimeError: invalid SRE code