diff --git a/src/main/java/seedu/cafectrl/parser/Parser.java b/src/main/java/seedu/cafectrl/parser/Parser.java index 7218a6ded..d0e501448 100644 --- a/src/main/java/seedu/cafectrl/parser/Parser.java +++ b/src/main/java/seedu/cafectrl/parser/Parser.java @@ -56,7 +56,7 @@ public class Parser implements ParserUtil { + "qty/\\s*(?.*)\\s*"; private static final String INGREDIENT_NAME_REGEX_GROUP_LABEL = "ingredientName"; private static final String INGREDIENT_QTY_REGEX_GROUP_LABEL = "ingredientQty"; - private static final String INGREDIENT_QTY_FORMAT_REGEX = "^\\s*(?[0-9]*)\\s*(?[a-zA-z]*)\\s*$"; + private static final String INGREDIENT_QTY_FORMAT_REGEX = "^\\s*(?[+-]*[0-9]*)\\s*(?[a-zA-z]*)\\s*$"; private static final String INGREDIENT_QTY_VALUE_REGEX_GROUP_LABEL = "value"; private static final String INGREDIENT_QTY_UNIT_REGEX_GROUP_LABEL = "unit"; private static final String ADD_DISH_NAME_ARGUMENT = "name/";