private void ParseSummary(string text) { var regex = new Regex(SummaryValuesRegex); foreach (Match match in regex.Matches(text)) { ParseSummaryValues(match); return; } throw new FormatException("Unable to parse test results."); }