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: Cannot compile escaped unicode character
Type: Stage:
Components: Regular Expressions Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: effbot Nosy List: effbot, glchapman, loewis, nathan22
Priority: normal Keywords:

Created on 2002-09-20 11:23 by nathan22, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (3)
msg12449 - (view) Author: Nathan L Miles (nathan22) Date: 2002-09-20 11:23
The following RE fails to compile on Python 2.2/
Windows XP.

I am trying to work around this by writing my own 
version of .escape which does not escape code points > 
127.


import re

a = unichr(0x2039)
b = u"["+re.escape(a)+u"]"
re.compile(b)
msg12450 - (view) Author: Greg Chapman (glchapman) Date: 2003-02-05 19:28
Logged In: YES 
user_id=86307

patch posted: http://www.python.org/sf/681152
msg12451 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-04-19 08:41
Logged In: YES 
user_id=21627

Greg's patch has been applied as sre_parse.py 1.57, fixing
this bug.
History
Date User Action Args
2022-04-10 16:05:41adminsetgithub: 37198
2002-09-20 11:23:13nathan22create