using uCalcSoftware; var uc = new uCalc(); var t = uc.NewTransformer(); t.Text = "a b c a d e a f g a h i"; var ruleA = t.FromTo("a", "[A]"); // Only find and transform the first 3 occurrences of 'a'. ruleA.StopAfter = 3; Console.WriteLine(t.Transform());