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 / Removing Spaces from Text
Power Automate
Answered

Removing Spaces from Text

(1) ShareShare
ReportReport
Posted on by 8

I have a variable with the text value of 'H e l l o'. How can I turn it into 'Hello'? 

I tried using the Text Replace in power automate desktop but it doesn't accept spaces. I tried converting the text into text with escape code which gave 'H\ e\ l\ l\ o' then using the replace I put '\ ' for the to find but it won't let me replace it with an empty value.

Omar2_0-1626276296623.png

 

Please help and thanks

I have the same question (0)
  • Verified answer
    tkuehara Profile Picture
    667 on at

    Hi @Omar2 

     

    Configure as follows:

    tkuehara_0-1626278113367.png

    This converts your text directly, without the need of escaping chars.

  • Riyaz_riz11 Profile Picture
    4,214 Super User 2026 Season 2 on at

    Hi @Omar2 

     

    Please pass text to find %' '%

    Replace with \

    If it helps mark it as a solution, and like for that.

    Regards

    Ahammad Riyaz

     

  • Daniel_Pa Profile Picture
    244 on at

    You could also use RegEx as:

    replace space.png

    I would recommend this cheatsheat, if you are curious about RegEx.

  • Riyaz_riz11 Profile Picture
    4,214 Super User 2026 Season 2 on at

    Hi @Daniel_Pa 

     

    Please look at this

     

    Trim.PNG

     

     

    This will work,

    Please mark it as a solution and like it , it will help for others also.

     

    Thanks,

    Ahammad Riyaz

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 253 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 172 Super User 2026 Season 2

#3
trice602 Profile Picture

trice602 134 Super User 2026 Season 2

Last 30 days Overall leaderboard