|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > !BLO.-Block-Commands > Block Information > String Operations |
MiniRobotLanguage (MRL)
BLO.VerifyContent
Verifies expected block count and retrieves content from the last block.

Intention
This Command is identical to BLO.Verify except it returns only the content (inner text) of the last block, without the delimiters. It combines verification with content extraction in one operation.
Use this when you need to validate the structure AND extract just the data from the final block.
Syntax
BLO.VerifyContent|P1|P2|P3|P4|P5|P6[|P7]
Parameter Explanation
•P1 - (Input, Text) The source string to analyze.
•P2 - (Input, Text) The starting delimiter string.
•P3 - (Input, Text) The ending delimiter string.
•P4 - (Input, Numeric) The expected number of blocks.
•P5 - (Input, Numeric) Allow exceed flag: 0=exact match required, 1=more blocks OK.
•P6 - (Output, Text) Variable to store the content of the last block (no delimiters).
•P7 - (Optional Output, Numeric) Variable to receive the actual block count.
Verifying and Getting Content
Source: "[ITEM]Apple[/ITEM][ITEM]Banana[/ITEM]"
Expected: 2 blocks
Result: "Banana" (content only, no [ITEM] tags)
Example
'***********************************
' BLO.VerifyContent Example
'***********************************
$$RESP="[MSG]Hello[/MSG][MSG]World[/MSG][MSG]Success[/MSG]"
' Expect 3 messages, get content of the last one
BLO.VerifyContent|$$RESP|[MSG]|[/MSG]|3|0|$$CONTENT|$$COUNT
' $$CONTENT = "Success"
' $$COUNT = 3
' Parse configuration sections
$$CFG="[SEC]A[/SEC][SEC]B[/SEC][SEC]C[/SEC][SEC]D[/SEC]"
' Expect at least 2 sections
BLO.VerifyContent|$$CFG|[SEC]|[/SEC]|2|1|$$LAST|$$TOTAL
' $$LAST = "D" (content of last section)
' $$TOTAL = 4 (actual count)
MBX.Last section contains: $$LAST
ENR.
Remarks
• Returns only the inner content, stripping the start and end delimiters.
• If verification fails, P6 receives an empty string.
• The delimiter removal is applied to the last block only.
• Combine with BLO.Count first if you need to check counts before deciding.
See also:
• BLO.Verify - Verify and get full block
• BLO.GetLastContent - Get content without verification
• BLO.RemoveTags - Strip delimiters from any block