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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Remove \n from string

(2) ShareShare
ReportReport
Posted on by 3
Hi,
 
I'm having trouble with removing linebreaks "\n" from af string. I can't use a replace expression, since it won't recognize the "\n"s. It is like the replace function only works with what is visible, and not the raw input. The trim function will remove the first and the last, but I can't figure out how to remove the remaining. It is a VIN number, slightly changed for this post, and I want to end up with the VIN number on one line without spaces.
 
Raw output from an OCR function:
 
"\nU X 8\nP\nT\n4\nS\nB\nX\nR\n4\nK B 2\n530\n"
 
I hope that one of you have a good idea.
 
Best regards,
Martin
Categories:
I have the same question (0)
  • Verified answer
    Chriddle Profile Picture
    8,436 Super User 2025 Season 2 on at
    replace(<your_string>,  decodeUriComponent('%0A'), '')
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,335 Super User 2025 Season 2 on at
    Slight updates to Chriddle as the replacement value was inside the decodeUri, not inside the replace
     
    replace(<your_string>,  decodeUriComponent('%0A'), '')
     
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard