Commit 3eb7828df2 for asterisk.org
commit 3eb7828df29c6e5e9a01956a45ec9cb5c37936c2
Author: Julian C. Dunn <jdunn@aquezada.com>
Date: Tue Feb 17 18:06:59 2026 -0800
astconfigparser.py: Fix regex pattern error by properly escaping string
"SyntaxWarning: invalid escape sequence '\s'" occurs when using the pjsip
migration script because '\' is an escape character in Python. Instead,
use a raw string for the regex.
diff --git a/contrib/scripts/sip_to_pjsip/astconfigparser.py b/contrib/scripts/sip_to_pjsip/astconfigparser.py
index eb48b70d7a..eb3885ec6b 100644
--- a/contrib/scripts/sip_to_pjsip/astconfigparser.py
+++ b/contrib/scripts/sip_to_pjsip/astconfigparser.py
@@ -240,7 +240,7 @@ def try_include(line):
included filename, otherwise None.
"""
- match = re.match('^#include\s*([^;]+).*$', line)
+ match = re.match(r'^#include\s*([^;]+).*$', line)
if match:
trimmed = match.group(1).rstrip()
quoted = re.match('^"([^"]+)"$', trimmed)