示例#1
0
        private SubtitleSearchResults FindInTextContentTillIndex(int subtitleNumber, string lineBreak, Regex regex, int endIndex, SubtitleTextType textType, bool backwards)
        {
            SubtitleText text         = subtitles.GetSubtitleText(subtitleNumber, textType);
            string       subtitleText = text.Get(lineBreak);

            if (backwards)
            {
                string subtitleTextSubstring = subtitleText.Substring(endIndex);
                return(MatchValues(regex.Match(subtitleTextSubstring), subtitleNumber, textType, endIndex));
            }
            else
            {
                string subtitleTextSubstring = subtitleText.Substring(0, endIndex);
                return(MatchValues(regex.Match(subtitleTextSubstring), subtitleNumber, textType, 0));
            }
        }
示例#2
0
        private SubtitleSearchResults FindInTextContentFromIndex(int subtitleNumber, string lineBreak, Regex regex, int startIndex, SubtitleTextType textType)
        {
            SubtitleText text = subtitles.GetSubtitleText(subtitleNumber, textType);

            return(MatchValues(regex.Match(text.Get(lineBreak), startIndex), subtitleNumber, textType, 0));
        }