Ejemplo n.º 1
0
 public void tryeit()
 {
     using (Form form = new Form())
     {
         Match     regexMatch = Regex.Match("aabbddaabbccsaaddbbccaaddasfaacd", "(aa).+?(aa)");
         MatchTree tree       = new MatchTree();
         tree.ShowMatch(regexMatch);
         form.Text = "Match Details";
         form.Controls.Add(tree);
         tree.Parent = form;
         tree.Dock   = DockStyle.Fill;
         form.ShowDialog();
     }
 }
 public void tryeit()
 {
     using (Form form = new Form())
     {
         Match regexMatch = Regex.Match("aabbddaabbccsaaddbbccaaddasfaacd", "(aa).+?(aa)");
         MatchTree tree = new MatchTree();
         tree.ShowMatch(regexMatch);
         form.Text = "Match Details";
         form.Controls.Add(tree);
         tree.Parent = form;
         tree.Dock = DockStyle.Fill;
         form.ShowDialog();
     }
 }
Ejemplo n.º 3
0
        static void MakeMatches()
        {
            if (s_matches != null)
            return;
            s_matches = new MatchTree<StringI, PrepWrap>();

            foreach (var p in Alternates) {
            foreach (var alt in p.Value) {
                var pieces = from s in alt.Split(' ') select new StringI(s);
                s_matches.addMatch(pieces, new PrepWrap(p.Key));
            }
            }
        }