diff --git a/FreeSpace2TranslationTools/Services/Regexp.cs b/FreeSpace2TranslationTools/Services/Regexp.cs index d9a3762..a6cd45d 100644 --- a/FreeSpace2TranslationTools/Services/Regexp.cs +++ b/FreeSpace2TranslationTools/Services/Regexp.cs @@ -94,7 +94,7 @@ public static class Regexp private static readonly Regex _StringParameters = new("\"(.*?)\"", RegexOptions.Compiled); public static Regex StringParameters { get => _StringParameters; } - private static readonly Regex _BeforeSexp = new("(#Fiction Viewer|#Command Briefing)", RegexOptions.Multiline | RegexOptions.Compiled); + private static readonly Regex _BeforeSexp = new("(^.*?#Cutscenes|#Fiction Viewer|#Command Briefing)", RegexOptions.Multiline | RegexOptions.Compiled); public static Regex BeforeSexp { get => _BeforeSexp; } private static readonly Regex _SexpVariablesSection = new("#Sexp_variables.*?(#Fiction Viewer|#Command Briefing)", RegexOptions.Singleline | RegexOptions.Compiled); @@ -103,7 +103,7 @@ public static class Regexp private static readonly Regex _VariableIds = new(@"^\t\t\d", RegexOptions.Multiline | RegexOptions.Compiled); public static Regex VariableIds { get => _VariableIds; } - private static readonly Regex _EndOfVariablesSection = new(@"\)\r\n\r\n(#Fiction Viewer|#Command Briefing|#Cutscenes)", RegexOptions.Multiline | RegexOptions.Compiled); + private static readonly Regex _EndOfVariablesSection = new(@"\)\r\n\r\n(#Fiction Viewer|#Command Briefing|.*?#Cutscenes)", RegexOptions.Multiline | RegexOptions.Compiled); public static Regex EndOfVariablesSection { get => _EndOfVariablesSection; } private static readonly Regex _EventsSection = new(@"#Events.*?\r\n\r\n", RegexOptions.Singleline | RegexOptions.Compiled);