[Python-bugs-list] [ python-Bugs-529923 ] re module syntax documentation omission

noreply@sourceforge.net noreply@sourceforge.net
Mon, 25 Mar 2002 12:24:14 -0800


Bugs item #529923, was opened at 2002-03-14 10:37
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=529923&group_id=5470

Category: Documentation
Group: Python 2.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jon Ribbens (jribbens)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: re module syntax documentation omission

Initial Comment:
The discussion of what the backslash character does in 
the documentation chapter "4.2.1 Regular Expression 
Syntax" is incorrect. In addition to the sequences 
listed, other sequences also work, e.g. "\n", "\x7f", 
etc.

>>> p = r"\x40"
>>> p
'\x40'
>>> re.search(p, "foo@bar")
<_sre.SRE_Match object at 0x183fc0>
>>> re.search(p, "x40")           
>>>

According to the documentation, the first search 
should fail and the second should succeed. In fact, 
the opposite occurs.


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

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2002-03-25 15:24

Message:
Logged In: YES 
user_id=3066

Fixed in Doc/lib/libre.tex revisions 1.81 and 1.73.6.6.

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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=529923&group_id=5470