mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 18:01:26 +08:00
feat: 优化正则
This commit is contained in:
@@ -300,7 +300,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
AddLog(details, detailsColor);
|
||||
{
|
||||
Url = CopilotUiUrl;
|
||||
var linkParser = new Regex(@"AV\d+/\?p=\d+|AV\d+|BV[a-zA-Z0-9]{10}/\?p=\d+|BV[a-zA-Z0-9]{10}", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
var linkParser = new Regex(@"(?:av\d+|bv[a-z0-9]{10})(?:\/\?p=\d+)?", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
foreach (Match match in linkParser.Matches(details))
|
||||
{
|
||||
Url = MaaUrls.BilibiliVideo + match.Value;
|
||||
|
||||
Reference in New Issue
Block a user