r"""Unescape a string escaped by `re.escape`. May raise ``ValueError`` for regular expressions which could not have been produced by `re.escape` (for example, strings containing ``\d`` cannot be unescaped). .. versionadded:: 4.4
(s: str)
| 207 | |
| 208 | |
| 209 | def re_unescape(s: str) -> str: |
| 210 | r"""Unescape a string escaped by `re.escape`. |
| 211 | |
| 212 | May raise ``ValueError`` for regular expressions which could not |
| 213 | have been produced by `re.escape` (for example, strings containing |
| 214 | ``\d`` cannot be unescaped). |
| 215 | |
| 216 | .. versionadded:: 4.4 |
| 217 | """ |
| 218 | return _re_unescape_pattern.sub(_re_unescape_replacement, s) |
| 219 | |
| 220 | |
| 221 | class Configurable(object): |
no outgoing calls