{@All}

Product: 

Class: 

Warning

uCalc API Preview Release Notice:The uCalc engine has successfully transitioned to modern cross-platform environments.The next phase envolves some structural changes, performance optimizations, and API refinements.The API is subject to breaking changes prior to the stable release. Please evaluate the preview version thoroughly before production use.

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}

ID: 203

See: {@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>>

This page last modified on: 

8/21/2026