[Python-bugs-list] [Bug #115119] re module docs missing lookbehind, etc.

noreply@sourceforge.net noreply@sourceforge.net
Fri, 22 Sep 2000 11:21:47 -0700


Bug #115119, was updated on 2000-Sep-22 11:12
Here is a current snapshot of the bug.

Project: Python
Category: Documentation
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: re module docs missing lookbehind, etc.

Details: Perhap this is not a bug, but the re module documentation does not describe some PCRE2 features that sre incorporates. Note that these did not make it into pre, and so are not necessary for pre compatibility, but maybe should be documented as sre features.

Here follows a text description from a message by AMK that accompanied a pyPCRE snapshot:

[I've lost the reference to the original and had to retype what follows.]

========
New features in PCRE2 compared to PCRE1 are:

\z    Matches only at the end of the string. This differs from the existing \Z, which will match at the end of the string, or before a final newline at the end of the string.

(?<=...)    Positive lookbehind assertion. Matches if the current position in the string is preceded by a match for the contained regex

(?<!...)    Negative lookbehind assertion. Matches if the current position in the string is not preceded by a match for the contained regex

========

FYI, two other PCRE2 features that AMK described don't seem to have make it into sre: "once-only subpatterns" and "conditional subpatterns".



Follow-Ups:

Date: 2000-Sep-22 11:14
By: gvanrossum

Comment:
For Fred to negotiate with Fredrik.
-------------------------------------------------------

Date: 2000-Sep-22 11:21
By: jdnier

Comment:
Actually, '\z' is supported by pre, so at least that should be added to the docs.
-------------------------------------------------------

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