public void Match_Wildcard_Replace2()
        {
            List<Run> runs = new List<Run>();
            runs.Add(new Run("TextBox search word"));
            runs.Add(new Run("TextBox"));
            runs.Add(new Run("TextBox"));
            runs.Add(new Run("Hello"));
            runs.Add(new Run("here is some more"));
            runs.Add(new Run("and some more"));

            RapidFindReplaceControlViewModel model = new RapidFindReplaceControlViewModel();
            model.FindOptions.UseWildcards = true;
            Keyoti.RapidFindReplace.WPF.FindHandlers.RunCollectionContainer container = new Keyoti.RapidFindReplace.WPF.FindHandlers.RunCollectionContainer(runs);
            model.Query = new Query("r*");
            model.FindText(container);


            model.SelectNextMatch();
            Assert.AreEqual("r", model.CurrentMatch.Text);
            Assert.AreEqual(runs[0], model.CurrentMatch.Run);
            //model.ReplaceMatch("   ");
            model.ReplaceAllMatches("   ");

            Assert.AreEqual("TextBox sea   ch wo   d", runs[0].Text);


           


        }
        public void Match_ReplaceAll()
        {
            List<Run> runs = new List<Run>();
            runs.Add(new Run("aa aa aa"));

            RapidFindReplaceControlViewModel model = new RapidFindReplaceControlViewModel();
            Keyoti.RapidFindReplace.WPF.FindHandlers.RunCollectionContainer container = new Keyoti.RapidFindReplace.WPF.FindHandlers.RunCollectionContainer(runs);
            container.IterationStartIndex = 3;// runs[0].Text.Length - 1;
            model.Query = new Query("aa");
            model.FindText(container/*, new Query("33([0-9])3")*/);

            model.ReplaceAllMatches("bb");


            Assert.AreEqual("bb bb bb", runs[0].Text);
        }