Browse Source

Regex handles empty strings

feature-config-parsing2
MagicBot 5 months ago
parent
commit
2417073a4d
  1. 2
      src/engine/ConfigParsing/EffectsParser.java

2
src/engine/ConfigParsing/EffectsParser.java

@ -27,7 +27,7 @@ public class EffectsParser { @@ -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));

Loading…
Cancel
Save