|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > !BLO.-Block-Commands > Content Extraction > String Operations |
MiniRobotLanguage (MRL)
BLO.BlockGetFirstContent
Returns the content of the first top-level block.
Intention
Scans a source string, finds the first complete, top-level block and returns only the text inside its delimiters. Nested blocks inside the content are left untouched.
Visual Example
[BEG] Hello World [/END] → " Hello World "
Syntax
BLO.BlockGetFirstContent|P1|P2|P3|P4
Parameter Explanation
•P1 – (Input, Text) Source string.
•P2 – (Input, Text) Start delimiter.
•P3 – (Input, Text) End delimiter.
•P4 – (Output, Text) Variable to receive the inner content.
Example
'***********************************
' BLO.BlockGetFirstContent Example
'***********************************
$$SRC=[ITEM]Apple[END] [ITEM]Orange[END]
BLO.BlockGetFirstContent|$$SRC|'[ITEM]'|'[END]'|$$OUT
PRT $$OUT '→ Apple
ENR.