uCalc API Version: 2.1.3-preview.2 Released: 6/17/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.

Verbatim = [bool]

Property

Product: 

Transformer Library

Class: 

Rule

Gets or sets whether a rule's variable captures are treated as verbatim blocks, preventing nested pattern matching within them.

Remarks

🛡️ Verbatim Capture: Making Content Opaque

By default, uCalc is "nested match aware." When a variable like {content} captures text, it remains aware of all other active patterns. If it encounters text that could match another rule, it respects that boundary, ensuring that matches don't "cross streams" or partially consume other valid patterns.

The Verbatim property allows you to override this behavior. When set to true, it disables nested match awareness for all variables within that rule. The capture becomes a "bulldozer," grabbing text based only on its own termination criteria (e.g., the next anchor or a statement separator) and ignoring all other patterns. This makes the captured content opaque or verbatim.

This property is the programmatic equivalent of using the ~ postfix modifier on a variable in a pattern string (e.g., {content~}).

🎯 Primary Use Case

Verbatim is essential for capturing sections of text that must be preserved exactly as-is, protecting them from other global transformation rules. This is ideal for:

  • Code blocks in documentation (<code>...</code>, ```...```)
  • Raw data segments
  • Pre-formatted text where internal structure must not be altered

Verbatim vs. ImmediateTransform

This property is the direct opposite of the ImmediateTransform property (and the % postfix).

  • Verbatim(true) (~): Prevents nested transformations inside the capture.
  • ImmediateTransform(true) (%): Forces nested transformations inside the capture.

For more details on the postfix modifier, see the Verbatim Capture ~ topic.

Examples