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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto t = uc.NewTransformer();
   t.Text("<h3>Title</h3><b>Bold statement</b><h3>Title B</h3><b>Other text</b><p>My paragraph</p>");

   auto AnyOtherTag = t.Pattern("<{tag}>{text}</{tag}>").SetDescription("other kind of tag");
   auto BoldTag = t.Pattern("<b>{text}</b>").SetDescription("bold tag");
   auto H3Tag = t.Pattern("<h3>{text}</h3>").SetDescription("h3 tag");
   t.Find();

   for(auto match : t.Matches()) {
      cout << match.Text() + "   Description: " + match.Rule().Description() << endl;
   }
}