Remove RegularExpressions

This commit is contained in:
crazytuzi committed 2026-05-26 00:35:18 +08:00
1 parent 94c787fd08
commit ffde42c70c
1 file changed
+13 -4
+13 -4
View File
@@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using EpicGames.Core;
using UnrealBuildTool;
@@ -305,11 +305,20 @@ public class CoreCLR : ModuleRules
if (HierarchySection.TryGetValue("PublishDirectory", out var Value))
{
var Match = Regex.Match(Value, @"Path=""([^""]+)""");
const string Prefix = "Path=\"";
if (Match.Success)
var Index = Value.IndexOf(Prefix, StringComparison.Ordinal);
if (Index >= 0)
{
return Match.Groups[1].Value;
Index += Prefix.Length;
var EndIndex = Value.IndexOf('"', Index);
if (EndIndex > Index)
{
return Value.Substring(Index, EndIndex - Index);
}
}
}
}