Extracting a parenthetical expression, including the parentheses.

ID: 1275

				
					using uCalcSoftware;

var uc = new uCalc();
using (var s = new uCalc.String("Calculate (10 * 5) and ignore this.")) {
   
   // Get the text from the opening parenthesis to the closing one.
   var expression = s.BetweenInclusive("(", ")");

   Console.WriteLine(expression);
}
				
			
(10 * 5)
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   {
      uCalc::String s("Calculate (10 * 5) and ignore this.");
      s.Owned(); // Causes s to be released when it goes out of scope

      // Get the text from the opening parenthesis to the closing one.
      auto expression = s.BetweenInclusive("(", ")");

      cout << expression << endl;
   }
}
				
			
(10 * 5)
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Using s As New uCalc.String("Calculate (10 * 5) and ignore this.")
         
         '// Get the text from the opening parenthesis to the closing one.
         Dim expression = s.BetweenInclusive("(", ")")
         
         Console.WriteLine(expression)
      End Using
   End Sub
End Module
				
			
(10 * 5)