silly regex

This commit is contained in:
floppydiskette 2024-11-19 01:20:38 +00:00
commit 3a76e62ba9
No known key found for this signature in database

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