public static List <DayOfWeek> QueryMeetingDays(this Course course) { Regex regex = new Regex(DataConstants.MeetingPatternOptions.TIME_PATTERN); Match match = regex.Match(course.MeetingPattern); List <DayOfWeek> MeetingDays = new List <DayOfWeek>(); foreach (Capture capture in match.Groups[1].Captures) { DayOfWeek day = DateUtil.AbbreviationToDayOfWeek(capture.Value); MeetingDays.Add(day); } return(MeetingDays); }