diff --git a/UndertaleModTool/Scripts/Resource Repackers/ImportGraphics.csx b/UndertaleModTool/Scripts/Resource Repackers/ImportGraphics.csx index 681fa3497..f2fd5e374 100644 --- a/UndertaleModTool/Scripts/Resource Repackers/ImportGraphics.csx +++ b/UndertaleModTool/Scripts/Resource Repackers/ImportGraphics.csx @@ -14,10 +14,11 @@ EnsureDataLoaded(); bool importAsSprite = false; +// TODO: see if this can be reimplemented using substring instead of regex? // "(.+?)" - match everything; "?" = match as few characters as possible. -// "(?:_(-*\d+))*" - an underscore + (optional minus + several digits); -// "?:" = don't make a separate group for the whole part, "*" = make this part optional. -Regex sprFrameRegex = new(@"^(.+?)(?:_(-*\d+))*$", RegexOptions.Compiled); +// "(?:_(\d+))" - an underscore followed by digits; +// "?:" = don't make a separate group for the whole part +Regex sprFrameRegex = new(@"^(.+?)(?:_(\d+))$", RegexOptions.Compiled); string importFolder = CheckValidity(); string packDir = Path.Combine(ExePath, "Packager");