Пример #1
0
        public void IdentifyActionSpans(ActionSpanSink actionSpanSink, string message)
        {
            var pattern_prefixes = "";
            var first            = true;

            foreach (var prefix in DogeRegEx)
            {
                if (first)
                {
                    first = false;
                }
                else
                {
                    pattern_prefixes += "|";
                }
                pattern_prefixes += prefix;
            }

            var pattern = "^(" + pattern_prefixes + ") ([a-zA-Z]+)$";

            foreach (Match match in new Regex(pattern, RegexOptions.IgnoreCase).Matches(message))
            {
                actionSpanSink(match, null);
            }
        }
Пример #2
0
 public void IdentifyActionSpans(ActionSpanSink actionSpanSink, string message)
 {
     foreach (var twitterUrlPattern in TwitterUrls)
     {
         foreach (Match match in new Regex(twitterUrlPattern, RegexOptions.IgnoreCase).Matches(message))
         {
             actionSpanSink(match, null);
         }
     }
 }
Пример #3
0
 public void IdentifyActionSpans(ActionSpanSink actionSpanSink, string message)
 {
     foreach (var pastebinUrlPattern in PastebinUrls)
     {
         foreach (Match match in new Regex(pastebinUrlPattern, RegexOptions.IgnoreCase).Matches(message))
         {
             actionSpanSink(match, match.Groups[2].ToString());
         }
     }
 }
Пример #4
0
 public void IdentifyActionSpans(ActionSpanSink actionSpanSink, string message)
 {
     foreach (var urlPattern in UrlShorteners)
     {
         foreach (Match match in new Regex(urlPattern, RegexOptions.IgnoreCase).Matches(message))
         {
             actionSpanSink(match, match.ToString());
         }
     }
 }
Пример #5
0
 public void IdentifyActionSpans(ActionSpanSink actionSpanSink, string message)
 {
     foreach (Match match in CurrencyRegex1.Matches(message))
     {
         actionSpanSink(match, "1");
     }
     foreach (Match match in CurrencyRegex2.Matches(message))
     {
         actionSpanSink(match, "2");
     }
 }