using uCalcSoftware; var uc = new uCalc(); var t = new uCalc.Transformer(); var rule = t.FromTo("ERROR", "[ERR]"); rule.GlobalMaximum = 2; // This input has 3 matches, which exceeds the maximum of 2. string input1 = "ERROR 1, ERROR 2, ERROR 3"; t.Transform(input1); Console.WriteLine($"Input 1 Match Count: {t.Matches.Count()}"); // Expect 0 // This input has 2 matches, which is within the limit. string input2 = "ERROR 1, ERROR 2"; t.Transform(input2); Console.WriteLine($"Input 2 Match Count: {t.Matches.Count()}"); // Expect 2 Console.WriteLine(t);