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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   uCalc::Transformer t;
   t.Text("ID:100, Name:Admin, ID:200");

   // Define two rules, but only one is marked as 'focusable'
   t.Pattern("ID:{@Number}").SetFocusable(true);
   t.Pattern("Name:{@Alpha}").SetFocusable(false);
   t.Find();

   // Get all matches using the default option
   auto allMatches = t.GetMatches();
   cout << "--- All Matches (" << allMatches.Count() << ") ---" << endl;
   cout << allMatches.Text() << endl;

   // Get only the focusable matches
   auto focusableMatches = t.GetMatches(MatchesOption::FocusableOnly);
   cout << "" << endl;
   cout << "--- Focusable Matches Only (" << focusableMatches.Count() << ") ---" << endl;
   cout << focusableMatches.Text() << endl;
}