From 3a76e62ba9e266f5928ab181f0739d8e56668c87 Mon Sep 17 00:00:00 2001 From: floppydiskette Date: Tue, 19 Nov 2024 01:20:38 +0000 Subject: [PATCH] silly regex --- src/main/java/net/hypr/doki/utils/DurationUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/hypr/doki/utils/DurationUtils.java b/src/main/java/net/hypr/doki/utils/DurationUtils.java index 3e91d3d..0c3b41c 100644 --- a/src/main/java/net/hypr/doki/utils/DurationUtils.java +++ b/src/main/java/net/hypr/doki/utils/DurationUtils.java @@ -7,7 +7,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class DurationUtils { - private static final Pattern timePattern = Pattern.compile("(\\d+)(?:([dhms]))?"); + private static final Pattern timePattern = Pattern.compile("(\\d+)([dhms])?"); public static Duration parseDuration(String input) throws IllegalArgumentException { Matcher matcher = timePattern.matcher(input);