#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; // Note the change in section/div/h2 auto t = uc.NewTransformer(); // The parent rule will find the
block and make its content available to a local transformer. // StatementSensitive(false) is needed so the multiline content is captured. auto parentRule = t.Pattern("
{body}
"); parentRule.StatementSensitive(false); // Get the local transformer for the
block. auto section_t = parentRule.LocalTransformer(); // These rules will ONLY run on the content inside the
tag. section_t.FromTo("

{text}

", "

====> {@Eval: UCase(text)} <====

"); section_t.FromTo("

{text}

", "

SELECTED: {text}

"); auto sourceHtml = R"(

Article One

This is NOT in the section.

Article Two

This one IS inside the section.

)"; t.Text(sourceHtml); t.Transform(); cout << t.Text() << endl; }