#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; #define tf(IsTrue) ((IsTrue) ? "True" : "False") int main() { uCalc uc; // Note the change in section/div/h2 auto t = uc.NewTransformer(); auto rule = t.Pattern("
{body}
").SetStatementSensitive(false); auto section = rule.LocalTransformer(); section.FromTo("

{text}

", "

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

"); section.SkipOver("&{entity};"); auto ch = section.FromTo("

{text}

", "

SELECTED: {text}

"); cout << "Has a local transformer: " << tf(rule.HasLocalTransformer()) << endl; cout << "rule is a child rule: " << tf(rule.IsChildRule()) << endl; cout << "ch is a child rule: " << tf(ch.IsChildRule()) << endl; auto HtmlText = R"(

Article One

This is the first article.

Article Two

This is the second article.

Article Three

This one is inside a <section>.

Article Four

This is the fourth article.

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