This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: re module syntax documentation omission
Type: Stage:
Components: Documentation Versions: Python 2.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fdrake Nosy List: fdrake, jribbens
Priority: normal Keywords:

Created on 2002-03-14 15:37 by jribbens, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (2)
msg9705 - (view) Author: Jon Ribbens (jribbens) * Date: 2002-03-14 15:37
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.
msg9706 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2002-03-25 20:24
Logged In: YES 
user_id=3066

Fixed in Doc/lib/libre.tex revisions 1.81 and 1.73.6.6.
History
Date User Action Args
2022-04-10 16:05:06adminsetgithub: 36259
2002-03-14 15:37:02jribbenscreate