From 2417073a4d94c6f4ce59fe4ab21489b0b6318372 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 8 Aug 2024 13:07:20 -0400 Subject: [PATCH] Regex handles empty strings --- src/engine/ConfigParsing/EffectsParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/ConfigParsing/EffectsParser.java b/src/engine/ConfigParsing/EffectsParser.java index c01d077e..2dc8d771 100644 --- a/src/engine/ConfigParsing/EffectsParser.java +++ b/src/engine/ConfigParsing/EffectsParser.java @@ -27,7 +27,7 @@ public class EffectsParser { private static final Pattern EFFECT_REGEX = Pattern.compile("(?<=EFFECTBEGIN)(.+?)(?=EFFECTEND)", Pattern.DOTALL); private static final Pattern SOURCE_REGEX = Pattern.compile("(?<=SOURCEBEGIN)(.+?)(?=SOURCEEND)", Pattern.DOTALL); private static final Pattern MODS_REGEX = Pattern.compile("(?<=MODSBEGIN)(.+?)(?=MODSEEND)", Pattern.DOTALL); - private static final Pattern STRSPLIT_REGEX = Pattern.compile("([^\"]\\S*|\".+?\")\\s*"); + private static final Pattern STRSPLIT_REGEX = Pattern.compile("([^\"]\\S*|\"[^\"]*\")\\s*"); public static void init() throws IOException { byte[] fileData = Files.readAllBytes(Paths.get(EffectsPath));