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:
parent
de25830b2b
commit
b36e23c0da
@ -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--)
|
||||
|
Loading…
Reference in New Issue
Block a user