Exemple #1
0
        /// <summary>
        /// A parse task
        /// pulls links out of a segment of hypertext
        /// </summary>
        /// <param name="hyperText"></param>
        /// <returns></returns>
        public async Task <IEnumerable <Match> > Parse(string hyperText)
        {
            IEnumerable <Match> result = await Task.Run(() =>
            {
                Regex linkMatcher = RegexLib.HyperLinkRegex();
                MatchCollection matchCollection = linkMatcher.Matches(hyperText);
                return(matchCollection.Cast <Match>());
            });

            return(result);
        }