예제 #1
0
        static void FindMatches(string content, int postID, int blogId, RegexTest test)
        {
            MatchCollection matches = Regex.Matches(content, test.RegularExp);

            if (matches.Count > 0)
            {
                PostUpdate update = new PostUpdate(blogId, postID, content);

                foreach (Match m in matches)
                {
                    update.RegexUpdates.Add(new RegexUpdate(m.Value, m.Result(test.ReplaceExp)));
                }

                posts.Add(update);
            }
        }
예제 #2
0
        static void FindMatches(string content, int postID, int blogId, RegexTest test)
        {
            MatchCollection matches = Regex.Matches(content, test.RegularExp);

            if (matches.Count > 0)
            {
                PostUpdate update = new PostUpdate(blogId, postID, content);

                foreach (Match m in matches)
                {
                    update.RegexUpdates.Add(new RegexUpdate(m.Value, m.Result(test.ReplaceExp)));
                }

                posts.Add(update);
            }
        }