The 'Utility - Search Text (Regex)' Power Automate action provides the capability to execute regex search expressions against the text provided.
We recommend using regexr.com to help build and text your regular expression tests.
ChatGPT, Bing Chat or your Microsoft Co-Pilots can also write the regular expression for you. Make sure you test the result.
The default 'Utility - Search Text (Regex)' flow action parameters are detailed below:
- Text: The text to search either directly typed or a dynamic string property
- Regex: The regex query used to find matches in the 'Text' parameter
Regex Expression Options
Please refrain from using inline regular expression options in a regular expression query, for example: (?imnsx-imnsx)
Please use the advanced parameters detailed below to configure regular expression options.
The advanced 'Utility - Search Text (Regex)' flow action parameters are detailed below:
- ECMAScript - Enables ECMAScript-compliant behaviour for the expression. This value can be used only in conjunction with the IgnoreCase and Multiline options.
- Explicit Capture - Specifies that the only valid captures are explicitly named or numbered groups of the form.
- Ignore Case - Specifies case-insensitive matching.
- Ignore Whitespace - Eliminates unescaped white space from the pattern and enables comments marked with #.
- Multiline - Changes the meaning of ^ and $ so they match at the beginning and end, respectively, of any line, and not just the beginning and end of the entire string.
- Right-to-Left - Specifies that the search will be from right to left instead of from left to right.
- Singleline - Specifies single-line mode. Changes the meaning of the dot (.) so it matches every character (instead of every character except \n).
- Return Groups - Specifies that the search will return match groups rather than match values
The 'Search Text - Regex' flow action returns the following data.
Action Specific Return Values
- Matches -An array of matches found in the text provided
Standard Return Values
- OperationId - The unique ID assigned to this operation.
- HttpStatusCode - The HTTP Status code for the response.
- HttpStatusMessage - The HTTP Status message for the response.
- Errors - An array of error messages should an error occur.
- Operation Status - Indicates whether the operation has been completed, has been queued or has failed.