1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 05:53:10 +08:00

Changed TIME_REGEX to accept everything in the parentheses

- changed osu-web link to the current value
This commit is contained in:
ratinfx 2023-11-11 16:14:26 +01:00
parent 6ddecfd806
commit c367697559

View File

@ -11,8 +11,8 @@ namespace osu.Game.Rulesets.Edit
public static class EditorTimestampParser public static class EditorTimestampParser
{ {
// 00:00:000 (1,2,3) - test // 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 // 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\((?:\d+[,|])*\d+\))?)"); public static readonly Regex TIME_REGEX = new Regex(@"\b(((\d{2,}):([0-5]\d)[:.](\d{3}))(\s\([^)]+\))?)");
public static string[] GetRegexGroups(string timestamp) public static string[] GetRegexGroups(string timestamp)
{ {