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 / Remove Special Character
Power Automate
Answered

Remove Special Character

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

 

I'm having an issue where special character is being captured in my dynamic content.

 

This is my dynamic expression: 

trim(first(skip(split(first(split(body('Html_to_text'),'Domain ID :')),'Publisher:'),1)))
 
The end result should be: Microsoft Windows. However, when the excel online sheet is populated and I filter the results, 3 different Microsoft Windows shows up. I am suspecting there are non-breaking spaces or carriage returns in the string.
 
If I do a CLEAN function in excel, the strings all match. May I know how I can do a clean function in flow? Thanks.
Categories:
I have the same question (0)
  • Paulie78 Profile Picture
    8,422 Moderator on at

    There is no clean function, but what you want to do can be done. What I suggest is that you first of all use the uriComponent function to output your string. This will show you all the non printable characters in your string. If you post the output of that here I will construct you a replace statement that will remove the characters. Also check out this blog post I did on the same subject:

    https://www.tachytelic.net/2020/10/remove-unwanted-characters-power-automate-flow/

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Paulie,

     

    Thanks for replying. Here's a screenshot of my current flow.

     

    Where should I insert the uriComponent function? I'll post the output here. Thank you.

     

    current flow.PNG

  • Paulie78 Profile Picture
    8,422 Moderator on at

    Just put this:

    uricomponent(trim(first(skip(split(first(split(body('Html_to_text'),'Domain ID :')),'Publisher:'),1))))

    After your html to text in a compose. You could also add a compose of:

    uricomponent(body('Html_to_text'))

    in a compose on it's own just so we can see all of the non-printable characters in one go, that is perhaps easier. You won't need these steps in the end, this is just to analyse what is there.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Paulie,

     

    This is the output I'm getting by using the uri component you suggested. I can't paste the text here for some reason but here is a screenshot. I hope this is helpful!

     

    Capture.PNG

  • Paulie78 Profile Picture
    8,422 Moderator on at

    You should be able to paste it in a code window here. If not, could you put it on pastebin ?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Paulie! Here you go. Thanks for waiting.

    %0A%0AFrom%3A%20noreply109%40cyberark.com%20%3Cnoreply109%40cyberark.com%3E%20%0ASent%3A%20Tuesday%2C%2015%20December%202020%2011%3A07%20am%0ATo%3A%20EPM%20Support%20%3Cepmsupport%40nus.edu.sg%3E%0ASubject%3A%20New%20Elevation%20Request%0A%0A%0A%0A%0A%0A-%20External%20Email%20-%0A%0A%0A%0AApplication%3A%20Internet%20Information%20Services%20%28IIS%29%20Management%0APolicy%3A%20Microsoft%20Windows%20OS%20%28Action%3A%20Collect%20Policy%20Automation%20Events%29%0APublisher%3A%20Microsoft%20Windows%0ADomain%20ID%20%3A%20NUSSTF%5Cccehhm%0AComputer%20%3A%20DESKTOP-A10VGF6%0AFileName%20%3A%20InetMgr.exe%0AJustification%3A%20Hi%20IT%20Care%2C%20%0A%0AI%20would%20like%20to%20request%20to%20access%20IIS%20server.%20Thank%20you.
  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at

    There are no special characters in this string (other than a linefeed).

    specialChars.PNG

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard