escape function bug
GoogleCodeExporter opened this issue · 4 comments
GoogleCodeExporter commented
The regex.escape function does not handle properly non-unicode input with
special_only=True.
I found the bug on line 327 of regex.py:
is:
if special_only:
for c in pattern:
if c in ALNUM:
s.append("\\")
s.append(c)
should be:
if special_only:
for c in pattern:
if c in NONLITERAL:
s.append("\\")
s.append(c)
Original issue reported on code.google.com by alakozik...@gmail.com
on 3 Dec 2014 at 10:48
GoogleCodeExporter commented
What version of regex are you using? It doesn't look like a recent one.
Original comment by re...@mrabarnett.plus.com
on 3 Dec 2014 at 8:13
- Added labels: ****
- Removed labels: ****
GoogleCodeExporter commented
[deleted comment]
GoogleCodeExporter commented
I updated to the newest version and the problem seems to be fixed. Thanks a lot!
Original comment by alakozik...@gmail.com
on 9 Dec 2014 at 7:44
- Added labels: ****
- Removed labels: ****
GoogleCodeExporter commented
Original comment by re...@mrabarnett.plus.com
on 9 Dec 2014 at 8:31
- Changed state: Invalid
- Added labels: ****
- Removed labels: ****