private static void CheckForHiddenText(Line line, string startWord, string endWord) { var match = RegularExpression.FindEverythingBetweenTwoWordsIncludingTheWords(line.Text, startWord, endWord); if (match.Success) { line.HiddenText.Add(new HideRange { Start = match.Start, End = match.End }); } }