1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-04 00:14:12 +08:00

Simplify the regex expression

This commit is contained in:
solstice23
2022-07-22 03:30:31 +08:00
Unverified
parent de25830b2b
commit b36e23c0da
+1 -1
View File
@@ -315,7 +315,7 @@ namespace osu.Game.Screens.Select
{
List<string> parts = new List<string>();
if (Regex.IsMatch(val, @"^\d+(:\d+(:\d+)?)?$")) // formats like 12:34
if (Regex.IsMatch(val, @"^\d+(:\d+){1,2}$")) // formats like 12:34
{
string[] splited = val.Split(':');
for (int i = splited.Length - 1; i >= 0; i--)