#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto t = uc.NewTransformer();
   t.Str("<h1>Header</h1><p>Paragraph 1.</p><p>Paragraph 2.</p>");

   // Define rules for different tags
   auto h1Rule = t.Pattern("<h1>{text}</h1>");
   auto pRule = t.Pattern("<p>{text}</p>");
   t.Find();

   // Get the total count of all matches from all rules
   cout << "Total matches (all rules): " << t.Matches().Count() << endl;

   // Get the count for only the paragraph rule
   cout << "Paragraph matches only: " << pRule.Matches().Count() << endl;
}