if (m.Success) { foreach (System.Text.RegularExpressions.Capture cap in m.Groups["line"].Captures) { string line = cap.Value.Trim().ToLower(); if (line.StartsWith("date:")) isDateValid = true; if (line.StartsWith("overview:")) isOverviewValid = true; if (line.StartsWith("author:")) isAuthorValid = true; WL(line); }