1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:42:57 +08:00

Simplify the regex expression

This commit is contained in:
solstice23 2022-07-22 03:30:31 +08:00
parent de25830b2b
commit b36e23c0da
No known key found for this signature in database
GPG Key ID: 7E7F5973D9260C8A

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--)