> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://docs.groupalarm.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Elements of the Flow - Text Parser

The text parser allows you to process character strings. Values can be extracted from the character string and saved as variables, which can then be used later in the flow.

For example, a certain passage can be filtered out of the text of an e-mail in order to be able to use it later as an alarm text when an alarm is triggered.

[Regular expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions) are available as a tool for extracting the appropriate passages from the character string.

**Configuration**

1️⃣ The `expert view` function allows the use of regular expressions.

2️⃣ The input function for the text can be used to specify the character string to be searched. Sources from previous elements can also be selected by activating the input function (rectangular symbol).

3️⃣ The variable can be named in the input field for the name, which can then be used in the further course of the flow.

4️⃣ The actual filtering then takes place in the input field for the RegEx query. When using the expert view, the regular expressions are available as described above.

Even without using the expert view, the character string is specified here for which the text specified in the input function is to be searched. 

The character string represents the key from which the text is to be stored in the variable. 

In our example, we use `alarmtext:`. This means that text following `Alarmtext:` in the body of the e-mail should be saved in the variable. If the expert view is activated, it is also automatically visible that the corresponding RegEx `(.*)` is used for this. 

The filter can then be further refined with the help of more detailed regular expressions.

5️⃣ The function `Required` can be used to determine whether the finding of the character string should be essential for the further course of the flow. If this function is active and the string is not found, the flow stops and will not execute subsequent elements.

6️⃣ So-called RegEx flags can be specified via the flag symbol. This function is also only available in the expert view.

Flags are parameters that are to be used when executing regular expressions. For example, insensitive can be used to specify that upper and lower case should be ignored during the search.

In GroupAlarm, the flags `multi line`, `insensitive`, `single line` and `ungreedy` are available. See also the following section on [mozilla.org](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions#advanced_searching_with_flags).

7️⃣ Additional variables can be added using the `Add Variable` function.


![](https://storage.crisp.chat/users/helpdesk/website/91fefd8b4b0ac000/flowtestparseren_u33ce3.png)