A simple optional word.

ID: 790

				
					using uCalcSoftware;

var uc = new uCalc();
var t = new uCalc.Transformer();
t.FromTo("This is a [very] important test", "MATCHED");

// Matches with the optional word
Console.WriteLine(t.Transform("This is a very important test"));

// Also matches without the optional word
Console.WriteLine(t.Transform("This is a important test"));
				
			
MATCHED
MATCHED
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   uCalc::Transformer t;
   t.FromTo("This is a [very] important test", "MATCHED");

   // Matches with the optional word
   cout << t.Transform("This is a very important test") << endl;

   // Also matches without the optional word
   cout << t.Transform("This is a important test") << endl;
}
				
			
MATCHED
MATCHED
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t As New uCalc.Transformer()
      t.FromTo("This is a [very] important test", "MATCHED")
      
      '// Matches with the optional word
      Console.WriteLine(t.Transform("This is a very important test"))
      
      '// Also matches without the optional word
      Console.WriteLine(t.Transform("This is a important test"))
   End Sub
End Module
				
			
MATCHED
MATCHED