Given a regex match, decode the escape sequence it contains.
(match: Match[str])
| 384 | """ |
| 385 | |
| 386 | def decode_match(match: Match[str]) -> str: |
| 387 | "Given a regex match, decode the escape sequence it contains." |
| 388 | return codecs.decode(match.group(0), "unicode-escape") |
| 389 | |
| 390 | return ESCAPE_SEQUENCE_RE.sub(decode_match, text) |
| 391 |