|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > !BLO.-Block-Commands > Content Extraction > String Operations |
MiniRobotLanguage (MRL)
BLO.RemoveTags
Removes only the outer start/end delimiters from one block string.
Intention
This Command expects P1 to already be a single full block and removes only the outer delimiter pair (P2/P3).
It does not scan the full source for multiple blocks. If P1 is not wrapped by the delimiters at its exact outer edges, the text is returned unchanged.
Nested delimiters inside P1 remain untouched.
Visual Example
[BEG]Hello[BEG]Inner[/END] World [/END] ? " Hello [BEG]Inner[/END] World "
Syntax
BLO.RemoveTags|P1|P2|P3[|P4]
BLO.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 - (Output, Text, Optional) Variable to receive the result. If omitted, result goes to Top of Stack (TOS).
Example
'***********************************
' BLO.RemoveTags Example
'***********************************
$$BLK = [BEG] Foo Bar [/END]
BLO.RemoveTags|$$BLK|[BEG]|[/END]|$$RES
' RESULT = " Foo Bar " (outer tags removed)
PRT $$RES
ENR.
See also:
? BLO.RemoveNestedTags - Remove nested tags
? BLO.GetLastContent - Get content directly
? STR.BlockRemoveTags - STR namespace alias