Command Recognition

This block can be used to extract values from any text. The search pattern is defined in the properties.

Table of Contents


Inputs

Abbreviation Summary Description
T Text Input Command text.




Outputs

Abbreviation Summary Value Range
Lv Last extracted value




Properties

Summary Description Default Value
Command recognition Characters used to extract a value:
\v = value,
\1 = Byte interpreted as 1st byte of the output value (\2, \3, ...),
\h = value interpreted as hexadecimal number

Characters to navigate through the text:
\. = any character,
\w = any word,
\# = any number,
\d = digits 0-9,
\m = character A-Z/a-z/0-9,
\a = character A-Z/a-z,
\s12 = skip 12 characters,
\iText\i = jump to 'Text'

Special characters:
\x = Hexadecimal number (e.g. 0x09),
\\ = Slash,
\t = Tab (0x09),
\b = Space (0x02) or Tab (0x09),
\r = Return (0x0d),
\n = Newline (0x0a)
-
Signed values If selected, the values \1, \2, \3, etc. are used with algebraic sign in command recognition (Signed Integer). -




Programming example

Command recognition can be used to navigate in a text or source text and to retrieve values.

In the following example, we always want to extract the current price of natural gas:

Since the indication "Natural Gas" is always the same, we jump to this position in the text. To skip the time indication in order to have the price retrieved, there are various possibilities:

Variant 1 via \d\a
With \d single digits and with \a single characters can be skipped:

Variant 2 via \#\w
With \# a number and with \w any word can be skipped:

Variant 3 via \s8
Since in this example the time will always have the same number of digits and characters, they can be skipped with \s8: