[Python-bugs-list] [Bug #112468] sre/pre bug

noreply@sourceforge.net noreply@sourceforge.net
Thu, 31 Aug 2000 08:24:14 -0700


Bug #112468, was updated on 2000-Aug-21 22:05
Here is a current snapshot of the bug.

Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: None
Priority: 7
Summary: sre/pre bug

Details: Compiling the simple pattern '(' with pre raises an exception while sre compiles it sucessfully. Further, the regex object that sre.compile returns will match any string.

Using Python 1.6b1 (#0, Aug  7 2000, 12:30:24) [MSC 32 bit (Intel)] on win32,

  >>> import sre
  >>> regex_ = sre.compile('(')
  >>> regex_.pattern
  '('
  >>> regex_.search('abc').group(0)
  ''

while

  >>> import pre
  >>> regex_ = pre.compile('(')
  Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "C:\Python16\lib\pre.py", line 243, in compile
      code=pcre_compile(pattern, flags, groupindex)
  pcre.error: ('missing )', 1)



Follow-Ups:

Date: 2000-Aug-22 05:34
By: gvanrossum

Comment:
According to Fredrik, this is a minor parsing bug in SRE.
He'll fix it.
-------------------------------------------------------

Date: 2000-Aug-25 07:42
By: jhylton

Comment:
Bumping priority so its gets fixed before release.

-------------------------------------------------------

Date: 2000-Aug-31 08:24
By: effbot

Comment:
note: for some reason, the RE test harness ignores syntax errors under certain conditions.  ...and it has done so all the time, so this is just one of many cases where SRE is more tolerant than PCRE.  sigh :-(
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=112468&group_id=5470