|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > !BLO.-Block-Commands > Content Extraction > String Operations |
MiniRobotLanguage (MRL)
BLO.BlockRemoveTags
Removes outer start/end delimiters from a given block, optionally trimming spaces.
Intention
This command takes a block string, strips off the leading startDelim and/or trailing endDelim.
It will ignore spaces around P1. It will not trim the content in P4.
If they appear exactly at the outer edges, ignores any nested tags inside, and returns the inner text.
Visual Example
[BEG]Hello[BEG]Inner[/END] World [/END] → " Hello [BEG]Inner[/END] World "
Syntax
BLO.BlockRemoveTags|P1|P2|P3|P4
STR.BRT|P1|P2|P3|P4
Parameter Explanation
•P1 - (Input, Text) The block string to process.
•P2 - (Input, Text) The starting delimiter to remove.
•P3 - (Input, Text) The ending delimiter to remove.
•P4 - (Input, Numeric) Optional flag (0=no trim, non-zero=trim spaces).
Example
'***********************************
' BLO.BlockRemoveTags Example
'***********************************
$$BLK = [BEG] Foo Bar [/END]
BLO.BlockRemoveTags|$$BLK|[BEG]|[/END]|$$RES
' RESULT = " Foo Bar "
PRT $$RES
ENR.