cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lipsitz
Advocate I
Advocate I

Remove/delete text in Power Automate Dedktop

I'm looking for a method to delete some text in a text file, there's no dedicated action to delete or remove text.

I tried using the "replace text" action, by filtering for the text to be removed and leaving the "replace with" field empty, it does work with every text editor I have ever worked with, but "replace with" field can not be empty.

I also tried  "^$" (without the quotes) which is essentially NULL in regex, but it was treated as text (even with regex turned on).

Seems like a rather odd and obvious omission, I guess I must be missing something really simple.

 
1 ACCEPTED SOLUTION

Accepted Solutions
fraenK
Memorable Member
Memorable Member

It's not really obvious 😉

The "empty string" variable is: %""%

View solution in original post

4 REPLIES 4
fraenK
Memorable Member
Memorable Member

It's not really obvious 😉

The "empty string" variable is: %""%

Works!

Thanks so much! 

Although it is a little counterintuitive, I thought everything between two %'s is supposed to be a variable.

I was searching the webs for a while, could not find much documentation.

fraenK
Memorable Member
Memorable Member

Sometimes it's good to have a look at the old WinAutomation documentation 😉

https://docs.winautomation.com/V9_0/en/--and----notation.html

It doesn't really solve the problem. If I wanted to replace the string with an empty one, it would work, but what if I wanted to delete the string?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Top Kudoed Authors
Users online (3,246)