silly regex

This commit is contained in:
floppydiskette 2024-11-19 01:20:38 +00:00
parent 28ca47394b
commit 3a76e62ba9
Signed by: fwoppydwisk
SSH key fingerprint: SHA256:Hqn452XQ1ETzUt/FthJu6+OFkS4NBxCv5VQSEvuk7CE

View file

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