#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; auto t = uc.NewTransformer(); t.Text("Find the longest word in this sentence."); t.Pattern("{@Alpha}"); // Match all words t.Find(); int maxLength = 0; string longestWord = ""; for(auto match : t.Matches()) { if (match.Length() > maxLength) { maxLength = match.Length(); longestWord = match.Text(); } } cout << "Longest word is '" << longestWord << "' with length: " << maxLength << endl; }