コード例 #1
0
ファイル: ContentFilters.cs プロジェクト: nevergofull/A
 public UserMentionFilter(int matchThreshold, bool ignoreDuplicatMatches)
 {
     _replacer = new MatchProcessingReplacer(ACCEPTABLE_LEADS + CONSTANTS.USER_HOT_LINK_REGEX, MatchFound)
     {
         MatchThreshold = matchThreshold, IgnoreDuplicateMatches = ignoreDuplicatMatches
     };
 }
コード例 #2
0
ファイル: ContentFilters.cs プロジェクト: Baycore/Teste
 public UserMentionFilter(int matchThreshold, bool ignoreDuplicatMatches)
 {
     _replacer = new MatchProcessingReplacer(ACCEPTABLE_LEADS + String.Format(@"((?'notify'-)?(?'prefix'@|/u/)(?'user'{0}))", CONSTANTS.USER_NAME_REGEX), MatchFound)
     {
         MatchThreshold = matchThreshold, IgnoreDuplicateMatches = ignoreDuplicatMatches
     };
 }
コード例 #3
0
ファイル: ContentFilters.cs プロジェクト: Baycore/Teste
        protected override string ProcessContent(string content, object context)
        {
            MatchProcessingReplacer replacer = new MatchProcessingReplacer(ACCEPTABLE_LEADS + @"(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_=!@:]*)(?<![\.\?\-_\,]|\s{1,})",
                                                                           ProcessLogic
                                                                           );

            return(replacer.Replace(content, context));
        }
コード例 #4
0
ファイル: ContentFilters.cs プロジェクト: Baycore/Teste
        protected override string ProcessContent(string content, object context)
        {
            MatchProcessingReplacer replacer = new MatchProcessingReplacer(ACCEPTABLE_LEADS + @"((/?v/)(?'sub'[a-zA-Z0-9]+((/(new|top(\?time=(day|week|month|year|all))?|comments/\d+(/\d+(?:/\d+(?:\d+)?)?)?)))?)(?'anchor'#(?:\d+|submissionTop))?)",
                                                                           ProcessLogic
                                                                           );

            return(replacer.Replace(content, context));
        }
コード例 #5
0
ファイル: ContentFilters.cs プロジェクト: nevergofull/A
        protected override string ProcessContent(string content, object context)
        {
            MatchProcessingReplacer replacer = new MatchProcessingReplacer(ACCEPTABLE_LEADS + CONSTANTS.HTTP_LINK_REGEX,
                                                                           ProcessLogic
                                                                           );

            return(replacer.Replace(content, context));
        }
コード例 #6
0
ファイル: ContentFilters.cs プロジェクト: Baycore/Teste
        protected override string ProcessContent(string content, object context)
        {
            MatchProcessingReplacer replacer = new MatchProcessingReplacer(ACCEPTABLE_LEADS + @"((/?r/)(?'sub'[a-zA-Z0-9_]+))", ProcessLogic);

            return(replacer.Replace(content, context));
        }
コード例 #7
0
ファイル: ContentFilters.cs プロジェクト: Rumel/voat
 public UserMentionFilter(int matchThreshold, bool ignoreDuplicatMatches)
 {
     _replacer = new MatchProcessingReplacer(ACCEPTABLE_LEADS + String.Format(@"((?'notify'-)?(?'prefix'@|/u/)(?'user'{0}))", CONSTANTS.USER_NAME_REGEX), MatchFound) { MatchThreshold = matchThreshold, IgnoreDuplicateMatches = ignoreDuplicatMatches };
 }
コード例 #8
0
ファイル: ContentFilters.cs プロジェクト: Rumel/voat
 protected override string ProcessContent(string content, object context)
 {
     MatchProcessingReplacer replacer = new MatchProcessingReplacer(ACCEPTABLE_LEADS + @"((/?v/)(?'sub'[a-zA-Z0-9]+((/(new|top(\?time=(day|week|month|year|all))?|comments/\d+(/\d+(?:/\d+(?:\d+)?)?)?)))?)(?'anchor'#(?:\d+|submissionTop))?)",
        ProcessLogic
     );
     return replacer.Replace(content, context);
 }
コード例 #9
0
ファイル: ContentFilters.cs プロジェクト: Rumel/voat
 protected override string ProcessContent(string content, object context)
 {
     MatchProcessingReplacer replacer = new MatchProcessingReplacer(ACCEPTABLE_LEADS + @"((/?r/)(?'sub'[a-zA-Z0-9_]+))", ProcessLogic);
     return replacer.Replace(content, context);
 }
コード例 #10
0
ファイル: ContentFilters.cs プロジェクト: Rumel/voat
 protected override string ProcessContent(string content, object context)
 {
     MatchProcessingReplacer replacer = new MatchProcessingReplacer(ACCEPTABLE_LEADS + @"(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_=!@:]*)(?<![\.\?\-_\,]|\s{1,})",
        ProcessLogic
     );
     return replacer.Replace(content, context);
 }
コード例 #11
0
ファイル: ContentFilters.cs プロジェクト: CuteThalia/voat
 protected override string ProcessContent(string content, object context)
 {
     MatchProcessingReplacer replacer = new MatchProcessingReplacer(ACCEPTABLE_LEADS + CONSTANTS.HTTP_LINK_REGEX,
        ProcessLogic
     );
     return replacer.Replace(content, context);
 }