<aside> 💡 Do you know that Microsoft Power Automate for desktop support regular expressions or regex? You can make use of regex for the following actions - Parse Text and Replace Text.
Say you have a text variable containing the following information:
You want to extract all the URLs contained inside this text. What can you do?
To extract all the URLs from the text, we can make use of the action Parse text:
Under the parameter Text to find, we will specify the following regular expression:
Remember to enable the option Is regular expression. In addition, the option First occurence only allows you to specify if you want to find the first match or all of the matches if there are more than 1. In the example, all the found URLs will be stored in the output variable Matches.
💡Pro tip: Use ‘%%’ to escape the special character ‘%’. Alternatively, you can also make use of the action Escape text for regular expression.