#include #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; uCalc::Transformer t; string text = "Replace config, but not the one inside [RAW]this config is raw[/RAW]."; // Create a token set for the raw block that only tokenizes single characters. uCalc::Transformer rawTransformer; auto rawTokens = rawTransformer.Tokens(); rawTokens.Clear(); rawTokens.Add("."); // Match any single character // Switch to rawTokens when [RAW] is found, and switch back at [/RAW]. t.Tokens().ContextSwitch(rawTokens, R"(\[RAW\])", R"(\[/RAW\])"); t.FromTo("config", "SETTING"); cout << t.Transform(text) << endl; }