From c367697559dc8981ce601e44afa45a3ce46a6dc9 Mon Sep 17 00:00:00 2001 From: ratinfx Date: Sat, 11 Nov 2023 16:14:26 +0100 Subject: [PATCH] Changed TIME_REGEX to accept everything in the parentheses - changed osu-web link to the current value --- osu.Game/Rulesets/Edit/EditorTimestampParser.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Rulesets/Edit/EditorTimestampParser.cs b/osu.Game/Rulesets/Edit/EditorTimestampParser.cs index 7d4247b269..b1488d298f 100644 --- a/osu.Game/Rulesets/Edit/EditorTimestampParser.cs +++ b/osu.Game/Rulesets/Edit/EditorTimestampParser.cs @@ -11,8 +11,8 @@ namespace osu.Game.Rulesets.Edit public static class EditorTimestampParser { // 00:00:000 (1,2,3) - test - // regex from https://github.com/ppy/osu-web/blob/651a9bac2b60d031edd7e33b8073a469bf11edaa/resources/assets/coffee/_classes/beatmap-discussion-helper.coffee#L10 - public static readonly Regex TIME_REGEX = new Regex(@"\b(((\d{2,}):([0-5]\d)[:.](\d{3}))(\s\((?:\d+[,|])*\d+\))?)"); + // osu-web regex: https://github.com/ppy/osu-web/blob/3b1698639244cfdaf0b41c68bfd651ea729ec2e3/resources/js/utils/beatmapset-discussion-helper.ts#L78 + public static readonly Regex TIME_REGEX = new Regex(@"\b(((\d{2,}):([0-5]\d)[:.](\d{3}))(\s\([^)]+\))?)"); public static string[] GetRegexGroups(string timestamp) {