Example #1
0
        private static void FindEverythingBetweenTwoWordsIncludingTheFirstWords(Line line, string startWord, string endWord)
        {
            var match = RegularExpression.FindEverythingBetweenTwoWordsIncludingTheFirstWords(line.Text, startWord, endWord);

            if (match.Success)
            {
                line.HiddenText.Add(new HideRange
                {
                    Start = match.Start,
                    End   = match.End
                });
            }
        }
Example #2
0
        private static void FindNetworkInfo(Line line)
        {
            var          match       = RegularExpression.FindEverythingBetweenTwoWordsIncludingTheFirstWords(line.Text, "Message[", "]");
            const string messageName = "MessageName: ";
            var          match2      = RegularExpression.FindEverythingBetweenTwoWordsIncludingTheFirstWords(line.Text, messageName, ",");

            if (match.Success)
            {
                line.HiddenText.Add(new HideRange {
                    Start = match.Start, End = match2.Start + messageName.Length - 1
                });
                line.HiddenText.Add(new HideRange {
                    Start = match2.End, End = match.End
                });
            }
        }