Welcome to Microsoft Q&A Platform!
Thanks for your question about using regular expressions (regex) with URLs in Azure Logic Apps. It's understandable to get frustrated when things don't work as they should, especially with technical tasks like this.
While quick fixes like using inline JavaScript or the replace function might seem easy, they're often limited and not great for handling changing content like URLs over time. These methods can easily become difficult to manage and unreliable.
A better long-term solution could be to use Azure Functions. These let you write custom code for complex tasks like regex replacements. You can create a function to process emails and efficiently remove URLs. By connecting this function to your Logic App, you get a more flexible and easily maintained solution that can adapt to future changes. Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.