From cbd66a7437430eab3dddb530ec23ab09e338204e Mon Sep 17 00:00:00 2001 From: AnimeGitB Date: Mon, 17 Oct 2022 13:52:52 +1030 Subject: [PATCH] Fix ambiguous command regexes --- .../java/emu/grasscutter/command/CommandHelpers.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/emu/grasscutter/command/CommandHelpers.java b/src/main/java/emu/grasscutter/command/CommandHelpers.java index ac52feef2..fd3541cb9 100644 --- a/src/main/java/emu/grasscutter/command/CommandHelpers.java +++ b/src/main/java/emu/grasscutter/command/CommandHelpers.java @@ -8,16 +8,16 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class CommandHelpers { - public static final Pattern lvlRegex = Pattern.compile("l(?:vl?)?(\\d+)"); // Java doesn't have raw string literals :( - public static final Pattern amountRegex = Pattern.compile("((?<=x)\\d+|\\d+(?=x)(?!x\\d))"); - public static final Pattern refineRegex = Pattern.compile("r(\\d+)"); + public static final Pattern lvlRegex = Pattern.compile("(?