web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate - How t...
Power Automate
Answered

Power Automate - How to Remove \r (Return Characters) within a string.

(0) ShareShare
ReportReport
Posted on by 12

Hello,

 

I am currently reading a .txt file into an Power Automate Cloud Flow. I break up each row within the file using an Apply to Each action. Next I grab specific values for each row, which I then used to build out a new String/line of text within the Cloud Flow.

 

Basically for each row the incoming/trigger file has, I build out a NEW line of text/row using values from the trigger file. 

 

The issue is that the final value within a row from the trigger .txt file I am using as a data source contains a return character.

 

Screenshot of Return Character.PNG
 
Value with Return Character.PNG

 

Function I use to grab the 12.942 value: replace(outputs('Parse_Current_EB_File_Row')?[8], '"', '')

Functions I've used to try and omit the \r:

1.) replace(replace(outputs('Parse_Current_EB_File_Row')?[8], '"', ''), decodeUriComponent('%0A%0D'),'')

2.) replace(replace(outputs('Parse_Current_EB_File_Row')?[8], '"', ''), ' ','')

 

I have also attempted using a replace() call with a variable containing a new line. None of any of these approaches work. 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Dlazowskileja ,

     

    Please try:

     

     replace(replace(outputs('Parse_Current_EB_File_Row')?[8], '"', ''), decodeUriComponent('%0D'),'')

     

    Best Regards,

    Bof

  • Verified answer
    Chriddle Profile Picture
    8,713 Super User 2026 Season 1 on at

    I assume you are reading this text file and splitting it into an array of lines at line break.

    The "\r" is leftover since your lines of text are separated not only by newlines but also by carriage returns.

    Just split your text differently:

     

    split(your_text, decodeUriComponent('%0D%0A'))

     

     

  • Dlazowskileja Profile Picture
    12 on at

    Hi Chriddle! 

     

    This worked. Instead of attempting to remove the \r from the single value coming from my trigger file, I used what you provided for the ENTIRE file. 

     

    Dlazowskileja_0-1680878816267.png

     

    Appreciate the help!

     

  • Dlazowskileja Profile Picture
    12 on at

    Hello!

     

    Thanks for the suggestion, but another post provided a solution. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 238 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 225

#3
Haque Profile Picture

Haque 181

Last 30 days Overall leaderboard