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
Super User
Super User

It's not really obvious 😉

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

View solution in original post

4 REPLIES 4
fraenK
Super User
Super User

It's not really obvious 😉

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

View solution in original post

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.

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

Top Solution Authors
Top Kudoed Authors
Users online (1,534)