mirror of
https://github.com/oneclickvirt/ecs.git
synced 2026-04-22 23:27:11 +08:00
fix:修复正则匹配
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user