Articles on: Administration

Configure Flow: Text Parser

Configure Flow: Text Parser



To be able to use values contained in a text as variables in the flow, you need the text parser.
With this, you can search directly for a so-called "key" and save the subsequent text of the same line as a variable.

The basic functioning is explained with the following text:

Hello GroupAlarm,

I would like to trigger an alarm with the following parameters:
Event: TESTALARM
Alarm text: ***TEST*** Do not move out!
LONG##50.76382
LAT##6.0793028
Address: Goethestraße 5, 52064 Aachen, Germany #

All subscribers are to be alerted.


Basically, the configured key is searched for within the text and removed from the found line, so that only the value behind it is stored. Therefore, if your key contains a :, it must be specified in the key.

Below are some examples applied to the above text that produce the following results:

SyntaxResult
Event:TESTALARM
Event: TESTALARM
LONG###50.76382



With Expert Mode, regular expressions can be applied to the text.
This allows you to search even more specifically for values within a text. To do this, use at least one regex group that is to be matched, as the text parser can only ever extract the first group found.

If the parser does not match a group, your variable will not contain a value.

For example, the RegEx Address(.*)# can be used to extract the address "Goethestraße 5, 52064 Aachen, Germany" from the text above without a leading key and # at the end.

In addition to the actual regular expression, you can also configure RegEx flags for an advanced search. The following flags are currently available:

FlagNameDescription
iinsensitiveignores upper and lower case spelling
mmulti lineTreats the search context as multiple lines, i.e. ^ and $ are the beginning and end of each line
ssingle line. also indicates a new line
Uungreedythe shortest possible string is used

Updated on: 28/02/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!