[Python-bugs-list] [ python-Bugs-612074 ] Cannot compile escaped unicode character

noreply@sourceforge.net noreply@sourceforge.net
Fri, 20 Sep 2002 04:23:13 -0700


Bugs item #612074, was opened at 2002-09-20 05:23
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=612074&group_id=5470

Category: Regular Expressions
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nathan L Miles (nathan22)
Assigned to: Fredrik Lundh (effbot)
Summary: Cannot compile escaped unicode character

Initial Comment:
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)


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

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