Extract Text According To Pattern
Description
This action extracts matching parts from a text based on a pattern, and optionally trims the results.
Input Arguments
Input Argument | Type | Description | Required? | Advanced Option? | Default |
---|---|---|---|---|---|
Text | String | Text to be split up. | ✔️ | ❌ | - |
Match Pattern | String | Pattern or text as part of the input text where it will splitted by. | ✔️ | ❌ | - |
Trim enabled | Boolean | Removes leading and trailing whitespace in all results. | ❌ | ✔️ | Yes |
Trim Strings | Boolean | Removes leading and trailing substring in all results. | ❌ | ✔️ | whitespace |
Output
Response | Type | Description |
---|---|---|
Text matches as list | Array | A list of all text segments that matched the specified pattern. |
Text matches as list item | String | A single match from the list, used e.g. in a loop/iteration. |
body | JSON Object | JSON object containing the matches key with the array of extracted text. |
Power Automate Examples
Extract Text
You can enter any kind of text in this field. In this example, the input contains order IDs: Order ID: 12345, Order ID: 67890, Order ID: 99999.
To extract specific parts of the text, such as numbers, a regular expression (RegEx) is used. In this case, we use the pattern \d+
, which matches one or more digits.
💡
Looking for the response to this example? Scroll up to see the Output tab.
Known Limitations
⚠️
If you experienced other limitations please get in touch with us!