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 Platform Community / Forums / Power Automate / Wanted to replace the ...
Power Automate
Unanswered

Wanted to replace the a with string with the special character to Hyphen

(0) ShareShare
ReportReport
Posted on by 51

Wanted to replace the string "THE - Mail (Test%&!).gg" by identifying and replacing special character with Hyphen. but I am able to identify if special characters are there or not in the string.

Categories:
I have the same question (0)
  • Verified answer
    v-yetonggu-msft Profile Picture
    on at

    Hi @sajinshaji ,

    I did a test for your reference.

    In my scenario:

    vyetonggumsft_0-1705408189056.png

    vyetonggumsft_1-1705408290421.png

     

    ["'", "!", "@", "£", "^", "=", ",", "%", "[", "]", ";", "~", "?", "<", ">", "|", "u0001", "u0007","$","#","&"]
    range(0, length(outputs('String_To_Modify')) )
    if
    (
     contains(outputs('Unwanted_Characters'), substring(outputs('String_To_Modify'), item(), 1)), 
     '', 
     substring(outputs('String_To_Modify'), item(), 1)
    ) 

     

    join(body('Select'), '')

    Best Regards,

    Sunshine Gu

  • sajinshaji Profile Picture
    51 on at

    Its works perfect and I done the modification that I needed to the given and got the result. 

    if
    (
     contains(outputs('Unwanted_Characters'), substring(outputs('String_To_Modify'), item(), 1)), 
     '-', 
     substring(outputs('String_To_Modify'), item(), 1)
    ) 

     

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard