fix:修复正则匹配

This commit is contained in:
spiritsoul
2026-01-12 23:28:45 +08:00
parent f3048d074c
commit feac73a427
+8 -2
View File
@@ -44,10 +44,16 @@ def modify_speed_go(filepath):
)
content = re.sub(
r'\n\s*// 对于三网测速(cmcc、cu、ct),优先使用 privatespeedtest 进行私有测速[\s\S]*?\n\s*}\n',
r'''
\n\s*// 对于三网测速(cmcc、cu、ct),优先使用 privatespeedtest 进行私有测速
\s*\n
\s*opLower\s*:=\s*strings\.ToLower\(operator\)
[\s\S]*?
\n\s*}\s*
''',
'\n',
content,
flags=re.MULTILINE
flags=re.MULTILINE | re.VERBOSE
)
write_file(filepath, content)