#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; auto t = uc.NewTransformer(); auto document = R"( Header: Section 1 Data: A Data: B Header: Section 2 Data: C )"; t.Text(document); auto dataRule = t.Pattern("Data: {val}"); auto headerRule = t.Pattern("Header: {val}"); dataRule.Minimum(2); cout << "--- Find with Minimum(2) ---" << endl; t.Find(); cout << "Total Matches: " << t.Matches().Count() << endl; cout << "Data Matches: " << dataRule.Matches().Count() << endl; cout << "Header Matches: " << headerRule.Matches().Count() << endl; dataRule.Minimum(4); cout << "" << endl; cout << "--- Find with Minimum(4) ---" << endl; t.Find(); cout << "Total Matches: " << t.Matches().Count() << endl; cout << "Data Matches: " << dataRule.Matches().Count() << endl; cout << "Header Matches: " << headerRule.Matches().Count() << endl; }