using uCalcSoftware; var uc = new uCalc(); var t = uc.NewTransformer(); t.Str("

Header

Paragraph 1.

Paragraph 2.

"); // Define rules for different tags var h1Rule = t.Pattern("

{text}

"); var pRule = t.Pattern("

{text}

"); t.Find(); // Get the total count of all matches from all rules Console.WriteLine($"Total matches (all rules): {t.Matches.Count()}"); // Get the count for only the paragraph rule Console.WriteLine($"Paragraph matches only: {pRule.Matches.Count()}");