result: LOCAL::RESULT = regex("<text to be matched>", expression: "<regex expression>")
- Automation Issue Lifecycle
- Automation Issue Lifecycle - Corner Cases
- Hints for KI-Writers
- HIRO 6 - Transition Guide for Users having used HIRO 5 before
- KI Best Practices
- KI Debugging
- Transition from KI Syntax 5
This can by used to extract part of a string using a regular expression. Only the first sub-match (first pair of matching parenthesis) will be extracted.
|The internal Elixir regex library is used, which is based on PCRE (Perl Compatible Regular Expressions). Please refer to the elixir documentation for further details.|
String onto which the regex is applied
Regular Expression, needs exactly one SubMatch-Pattern. e.g. "Value: (0-9+) Seconds"
result: LOCAL::RESULT = regex("Here is a hidden value 47.11 inside", expression: ".*value ([0-9.]+) .*")
In this example we match a "string" that contains: "Here is a hidden value 47.11 inside". We want to extract the number value from this so our regex matches only numbers with a decimal point.
The resulting match of the regex is "47.11". This value is then stored
in the variable
RESULT in the LOCAL scope.