|
|
@ -28,7 +28,7 @@ public class EffectsParser { |
|
|
|
private static final Pattern SOURCE_REGEX = Pattern.compile("(?<=SOURCEBEGIN)(.+?)(?=SOURCEEND)", Pattern.DOTALL); |
|
|
|
private static final Pattern SOURCE_REGEX = Pattern.compile("(?<=SOURCEBEGIN)(.+?)(?=SOURCEEND)", Pattern.DOTALL); |
|
|
|
private static final Pattern MODS_REGEX = Pattern.compile("(?<=MODSBEGIN)(.+?)(?=MODSEND)", Pattern.DOTALL); |
|
|
|
private static final Pattern MODS_REGEX = Pattern.compile("(?<=MODSBEGIN)(.+?)(?=MODSEND)", Pattern.DOTALL); |
|
|
|
private static final Pattern CONDITIONS_REGEX = Pattern.compile("(?<=CONDITIONBEGIN)(.+?)(?=CONDITIONEND)", Pattern.DOTALL); |
|
|
|
private static final Pattern CONDITIONS_REGEX = Pattern.compile("(?<=CONDITIONBEGIN)(.+?)(?=CONDITIONEND)", Pattern.DOTALL); |
|
|
|
private static final Pattern STRSPLIT_REGEX = Pattern.compile("([^\"]\\S*|\"[^\"]*\")\\s*"); |
|
|
|
private static final Pattern STRSPLIT_REGEX = Pattern.compile("([^\"]\\S*|\"[^\"]*\")\\s*"); // Regex ignores spaces within quotes
|
|
|
|
|
|
|
|
|
|
|
|
public static void parseWpakFile() throws IOException { |
|
|
|
public static void parseWpakFile() throws IOException { |
|
|
|
|
|
|
|
|
|
|
@ -68,8 +68,6 @@ public class EffectsParser { |
|
|
|
else |
|
|
|
else |
|
|
|
firstLine = effectData; |
|
|
|
firstLine = effectData; |
|
|
|
|
|
|
|
|
|
|
|
// Regex ignores spaces within quotes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Matcher matcher = STRSPLIT_REGEX.matcher(firstLine); |
|
|
|
Matcher matcher = STRSPLIT_REGEX.matcher(firstLine); |
|
|
|
|
|
|
|
|
|
|
|
while (matcher.find()) |
|
|
|
while (matcher.find()) |
|
|
|