mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 09:27:18 +09: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>();
|
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(':');
|
string[] splited = val.Split(':');
|
||||||
for (int i = splited.Length - 1; i >= 0; i--)
|
for (int i = splited.Length - 1; i >= 0; i--)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user