Aldwin Pollefeyt <aldwinald...@gmail.com> added the comment:

Python 3.9.0a0
[GCC 7.3.0] on linux
>>> import re
>>> find_unsafe_bytes = re.compile(b'[^\w@%+=:,./-]').search
<stdin>:1: SyntaxWarning: invalid escape sequence \w

when removing \w, all the tests pass

(my regex knowledge is close to None.)

"\w stands for "word character". It always matches the ASCII characters 
[A-Za-z0-9_]"

replace \w with A-Za-z0-9_ ?? (all the tests pass)

----------
nosy: +aldwinaldwin

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue25567>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to