mirror of
https://github.com/asterisk/asterisk.git
synced 2026-05-29 13:59:48 +00:00
Recent python versions complain when backslashes in strings create invalid
escape sequences. This causes issues for strings used as regex patterns like
`'^List\[(.*)\]$'` where you want the regex parser to treat `[` and `]`
as literals. Double-backslashing is one way to fix it but simply converting
the string to a raw string `re.match(r'^List\[(.*)\]$', text)` is easier
and less error prone.
(cherry picked from commit f80e2405e6)
26 KiB
26 KiB