Replace Text With Pattern

Replace Text With Pattern

Description

This action searches for a specific pattern in a text and replaces it with something else.

Input Arguments

Input ArgumentTypeDescriptionRequired?Advanced Option?Default
Input TextStringThe text in which the search and replace operation will be performed.✔️-
Search PatternStringThe pattern or testwhich should be replaced inside of the input text.✔️-
Replacement TextStringText which will be inserted instead of the search pattern into the input text.-

Output

ResponseTypeDescription
Replaced TextStringThe final text after replacing the pattern.
bodyJSON ObjectA JSON object with the key text containing the final result.

Power Automate Examples

Replace Text With Text

You can enter plain text to tell the action what to look for. The action will search for the pattern and return the text with the pattern replaced.

Picture

Replace Text With Regular Expression

You can also use a regular expression for the search pattern.

Picture

💡

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!