String Operations

<< Click to Display Table of Contents >>

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

String Operations

BLO.BlockRemoveBlock

Previous Top


MiniRobotLanguage (MRL)

 

BLO.BlockRemoveBlock

Removes the entire Nth block (with delimiters).

 

Intention

 

This command finds the Nth top-level block in a string and deletes it entirely, including its start and end delimiters. This is useful for completely removing an element from a list or a record from a structured text file.

 

Syntax

 

BLO.BlockRemoveBlock|P1|P2|P3|P4[|P5]

 

Parameter Explanation

 

P1 - (Input/Output, Text) The variable containing the source string.

P2 - (Input, Text) The starting delimiter string.

P3 - (Input, Text) The ending delimiter string.

P4 - (Input, Numeric) The 1-based index of the block to remove.

P5 - (Output, Text) Optional. A different variable to store the modified string. If omitted, P1 is modified in place.

 

Example

 

'***********************************

' BLO.BlockRemoveBlock Example

'***********************************

$$SRC=[A]1[Z] [A]2[Z] [A]3[Z]

' Remove the second block entirely

BLO.BlockRemoveBlock|$$SRC|[A]|[Z]|2

' $$SRC now contains [A]1[Z] [A]3[Z]

MBX.$$SRC

ENR.