Issue35846
Created on 2019-01-29 08:06 by pbugnion, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg334504 - (view) | Author: Pascal Bugnion (pbugnion) | Date: 2019-01-29 08:06 | |
The documentation for `re.sub` states that "Unknown escapes such as ``\&`` are left alone.". This is only true for escapes which are not ascii characters, as far as I can tell (c.f. source on https://github.com/python/cpython/blob/master/Lib/sre_parse.py#L1047). Would there be value in amending that documentation to either remove that sentence or to clarify it? If so, I'm happy to submit a PR on GitHub. |
|||
| msg334642 - (view) | Author: Windson Yang (Windson Yang) * | Date: 2019-02-01 01:46 | |
I wonder if possible that c not in ASCIILETTERS when we get KeyError?
if c in ASCIILETTERS:
raise s.error('bad escape %s' % this, len(this))
|
|||
| msg335543 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2019-02-14 16:47 | |
This is a duplicate of issue28450. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:10 | admin | set | github: 80027 |
| 2019-02-14 16:47:40 | serhiy.storchaka | set | status: open -> closed superseder: Misleading/inaccurate documentation about unknown escape sequences in regular expressions nosy:
+ serhiy.storchaka |
| 2019-02-01 01:46:34 | Windson Yang | set | nosy:
+ Windson Yang messages: + msg334642 |
| 2019-01-29 08:06:08 | pbugnion | create | |
