{@Eval}, {@@Eval}, and escaping special characters in a pattern

ID: 201

				
					using uCalcSoftware;

var uc = new uCalc();
var t = uc.NewTransformer();

t.FromTo("'['{word}']'", "{@Eval: UCase(word)}");
t.FromTo("'{'{expr}'}'", "{@@Eval: expr}");

Console.WriteLine(t.Transform("Words like [this] and [that]."));
Console.WriteLine(t.Transform("Is {5*3} bigger than {5^3}?"));
				
			
Words like THIS and THAT.
Is 15 bigger than 125?
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto t = uc.NewTransformer();

   t.FromTo("'['{word}']'", "{@Eval: UCase(word)}");
   t.FromTo("'{'{expr}'}'", "{@@Eval: expr}");

   cout << t.Transform("Words like [this] and [that].") << endl;
   cout << t.Transform("Is {5*3} bigger than {5^3}?") << endl;
}
				
			
Words like THIS and THAT.
Is 15 bigger than 125?
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t = uc.NewTransformer()
      
      t.FromTo("'['{word}']'", "{@Eval: UCase(word)}")
      t.FromTo("'{'{expr}'}'", "{@@Eval: expr}")
      
      Console.WriteLine(t.Transform("Words like [this] and [that]."))
      Console.WriteLine(t.Transform("Is {5*3} bigger than {5^3}?"))
   End Sub
End Module
				
			
Words like THIS and THAT.
Is 15 bigger than 125?