diff --git a/src/RegexColumnizer/RegexColumnizer.cs b/src/RegexColumnizer/RegexColumnizer.cs index bb559374..7b9da70f 100644 --- a/src/RegexColumnizer/RegexColumnizer.cs +++ b/src/RegexColumnizer/RegexColumnizer.cs @@ -33,12 +33,24 @@ public IColumnizedLogLine SplitLine(ILogLineColumnizerCallback callback, ILogLin if (Regex != null) { var m = Regex.Match(line.FullLine); - for (int i = m.Groups.Count - 1; i > 0; i--) + + if (m.Success) { - logLine.ColumnValues[i-1] = new Column + for (int i = m.Groups.Count - 1; i > 0; i--) + { + logLine.ColumnValues[i-1] = new Column + { + Parent = logLine, + FullValue = m.Groups[i].Value + }; + } + } + else + { + logLine.ColumnValues[columns.Length - 1] = new Column { Parent = logLine, - FullValue = m.Groups[i].Value + FullValue = line.FullLine }; } } @@ -148,4 +160,4 @@ public class Regex6Columnizer : Regex1Columnizer { } public class Regex7Columnizer : Regex1Columnizer { } public class Regex8Columnizer : Regex1Columnizer { } public class Regex9Columnizer : Regex1Columnizer { } -} \ No newline at end of file +}