String Operations

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

String Operations

BLO.Attr

Overview Top


MiniRobotLanguage (MRL)

 

BLO.Attr

Extract the first value of a named attribute.

 

Intention

Find one named attribute in tag-like text and return its value.

Quoted and unquoted attribute values are supported.

 

Syntax

BLO.Attr|P1|P2|P3

BLO.BAT|P1|P2|P3

 

Parameter Explanation

-P1 - Source tag text.

-P2 - Attribute name.

-P3 - Result variable.

 

Example

$$SRC=<tag attr="value42" other="x" data-id="A1">

BLO.Attr|$$SRC|data-id|$$RES

' $$RES = A1

ENR.

 

Remarks

-Returns first matching attribute occurrence.

-Missing attribute returns empty output.

 

See also:

BLO.PromptSection

BLO.GetFirst