Check template match Version 6 (Net)
Action group: text
Description
Checks if the text matches the specified regular expression.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Text | Source text for processing | Robin.String | Yes | |
Pattern | The regular expression pattern to match | Robin.String | Yes | |
Results | ||||
Result | A boolean variable to which the test result will be written. | Robin.Boolean | true |
Special conditions of use
You can read about the syntax of regular expressions in open sources, e.g. https://regex101.com/.
Example of use
Task
There is a text variable "Input text" with value = 6. We need to check if the value of the input text variable matches the regular expression: \d . If the condition matches, output the message - "the text matches the regular expression", if it does not match "the text does NOT match the regular expression".
Solution
Use the "Check template match", "If", "Show message" actions.
Implementation
- Create a boolean variable to which the result of the "Check template match" action will be written and a string variable "Input text" with the number 6.
- Move the "Check template match" action to the workspace and set its parameters.
- Move the "If" action to the workspace and set its parameter.
- Add a "Show message" action to the "Truth" branch and set its parameter.
- In the "False" branch, add a "Show message" action and set its parameter.
- Click "Start" in the top panel.
Result
The program robot completed successfully.
The result is displayed in a dialog box.
Обзор
Инструменты контента