
Announcements
The following scenario:
As soon as a certain email arrives, I want to extract and edit the HTML body. It is important to really work with the html body and not with normal text (e.g. with the html to string action). At first I only want to extract a part of the email, this already works with substring. In the next step I want to remove all links. To do this, I wanted to remove the href attributes using replace and regular expressions. Unfortunately without success, I have used various regular expressions but the links are simply not removed. I assume this is because I am trying to manipulate an html element as a string.
In the last step the extracted part with the removed links should be sent to a backend, so all html formatting (except the links) must be preserved.
In the image i show my flow. In the ComposeContent action i try to remove the links. The rest of my flow works as desired.
Can someone help me here, I'm pretty new to Power automate? Thank you very much!
Unless it has changed recently, there is no built in reg expression handler in Flow, you need to write your own or use a 3rd party one.
Using the ^ and * in your statement will be literal, not the regex meaning.
There are plenty of blog posts out there with methods to replicate regex.