BLO.RemoveNestedTags

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > String commands > !BLO.-Block-Commands > Content Extraction >

BLO.RemoveNestedTags

Intention

Removes all nested delimiter pairs from within top-level blocks, flattening the content structure while preserving the outermost block delimiters. This is useful for normalizing nested block structures into flat content.

Syntax

BLO.RemoveNestedTags|P1|P2|P3[|P4]

 

Parameter Explanation

Parameter

Description

P1

The source string variable containing the block structure to process.

P2

The starting delimiter string that marks the beginning of blocks (e.g., "<think>", "[").

P3

The ending delimiter string that marks the end of blocks (e.g., "</think>", "]").

P4

Optional output variable. If omitted, the result is placed on TOS.

 

Example

Input string with nested blocks:

<response>Hello <inner>world</inner> how <inner>are</inner> you</response>

 

After BLO.RemoveNestedTags:

<response>Hello world how are you</response>

 

See Also

BLO.RemoveTags - Removes only the outermost delimiter pair from a block

BLO.RemoveContent - Removes the content of the nth block, leaving empty delimiters

BLO.RemoveBlock - Completely removes the nth block including delimiters

BLO.GetNestedNth - Gets a nested block at a specific nesting level

BLO.Repair - Repairs malformed block structures

 

Navigation

Previous: BLO.RemoveContent | Top: Block Commands | Next: BLO.GetFirstContent