-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
修改特殊匹配规则 #36
修改特殊匹配规则 #36
Conversation
请把你对应的测试文件名发出来,谢谢。你修改的规则会破坏以前的匹配。 |
我这里测试以前的组貌似不能正常命名,现在这个版本我自己测试命名是正常的
均测试通过,以下为运行完整log
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以优化
], | ||
], | ||
['[Moozzi2]', | ||
[ | ||
r'^\[Moozzi2\] .* - (.*?) .*', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moozzi2一般默认规则就能解析到,不需要特殊匹配
], | ||
], | ||
['[AI-Raws]', | ||
[ | ||
r'^\[AI-Raws\] .* #(.*?) .* \(.*\)\[.*\]', | ||
r'^\[AI-Raws\] .* #(.*?) .*', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
正则不要简化,避免命名规则变动后产生误判
@@ -2,13 +2,18 @@ | |||
starts_with_rules = [ | |||
['[GM-Team]', | |||
[ | |||
r'^\[GM-Team\]\[.*?\]\[.*?\]\[.*?\]\[.*?\]\[(.*?)\]', | |||
r'^\[GM-Team\](?:\[.*?\]){3}\[(.*?)\]', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个新的匹配规则识别不了这个组以前的命名规范
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
合并
我稍微修改了一下GM-Team的正则,新的和旧的都能匹配到 d7e9cb6 |
对已有的GM-Team组,AI-Raws组匹配规则进行优化,新增对Moozzi2组的特殊命名规则的兼容