uCalc API Version: 2.1.3-preview.2 Released: 6/16/2026

Warning

uCalc API Preview Release Notice:The documentation describes the intended behavior of the API. The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes.

{@All}

Product: 

Class: 

Remarks

Global Capture Directive

Description: A structural directive that represents the entire source text being processed, regardless of token boundaries or internal formatting.

The {@All} directive is used within a uCalc::Transformer to target the full scope of the input string. While most directives (like {@Number} or {@Alpha}) focus on specific tokens, {@All} provides a way to interact with the document as a single, unified entity.

Purpose and Scope

{@All} is typically used when you need to perform a "Document-Level" transformation. Instead of matching individual pieces, you are matching the entirety of what was passed into the Transform() method.

  • Implicit Context: It ignores standard delimiters (like whitespace or newlines) and treats everything from the first character to the last as part of the match.
  • Anchor Pairing: It is often used in conjunction with {@Beginning} and {@End} to ensure the pattern represents the absolute total content of the source.

Contrast with {@Doc}

In the replacement string of a rule:

  • {@Self}: Refers to the text that was specifically matched by your pattern.
  • {@Doc}: Refers to the entire original source document.
  • {@All}: When used in a pattern, it causes the capture to encompass the entire input.

Examples

{@All}
				
					using uCalcSoftware;

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

t.FromTo("{@All}", "<<{@Self}>>");

Console.WriteLine(t.Transform("This is a test"));
				
			
<<This is a test>>
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

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

   t.FromTo("{@All}", "<<{@Self}>>");

   cout << t.Transform("This is a test") << endl;
}
				
			
<<This is a test>>
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t = uc.NewTransformer()
      
      t.FromTo("{@All}", "<<{@Self}>>")
      
      Console.WriteLine(t.Transform("This is a test"))
   End Sub
End Module
				
			
<<This is a test>>