[DatFile, Style] Fix CMP parsing again

This commit is contained in:
Matt Nadareski
2016-11-04 10:02:25 -07:00
parent eac3c6d390
commit fb83b02437
2 changed files with 16 additions and 4 deletions

View File

@@ -405,6 +405,7 @@ namespace SabreTools.Helper.Tools
public static string[] SplitLineAsCMP(string s)
{
// Preprocess the string
s = s.Trim();
s = Regex.Replace(s, @"^\S* \(", ""); // Remove item identifier and opening brace
s = Regex.Replace(s, @"#.*$", ""); // Remove trailing comments
s = s.TrimEnd(')'); // Remove closing brace