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 / Incorrect Replacement ...
Power Automate
Answered

Incorrect Replacement of Special Symbols

(0) ShareShare
ReportReport
Posted on by 24

Hello,
I am encountering a strange phenomenon in the "Replace Text" action.

 

For example, there is a text consisting of a symbol combining two alphabet letters, such as "fi" and two separate characters "f" and "i".
When trying to replace the symbol "fi" with the two separate characters "f" and "i", for some reason the original two characters "fi" turn into "fii".

 

In another example, there is a similar symbol and two-character combination like "㎍ μg".
When trying to replace the symbol "㎍" with "μg", the "μg" turns into "μgg".

 

Why?

Is there a solution?

I am having trouble because unrelated text is being replaced.

 

fi : U+FB01

㎍ : U+338D

20230130181411_14.jpg

 

20230130181418_14.jpg

 

I have the same question (0)
  • momlo Profile Picture
    1,527 Super User 2024 Season 1 on at

    Hi,

    On the first glance, it seems PAD is replacing "f" and 'i" and not "fi" just like if you used regex: f|i or [fi] so I would check the action

    Did you toggle "regex" option in the replace text action? Can you copy the action and paste it here so we could see the code?

     

    If yo use ergex, then try to use this: (?<=\s)fi(?=\s)

     

    momlo_1-1675080285203.png

     

     

  • Verified answer
    samoedo Profile Picture
    24 on at

    Thank you for your answer.

    To let you know in advance, I was able to solve it by turning on "use regular expression."

     

    At the time of the question, I was not using regular expressions.

    The other options were also as they were when I added the action.

    Here is a copy of the action at that time.

     

     

    SET NewVar TO $'''fi
    fi'''
    Text.Replace Text: NewVar TextToFind: $'''fi''' IsRegEx: False IgnoreCase: False ReplaceWith: $'''fi''' ActivateEscapeSequences: False Result=> NewVar
    SET NewVar2 TO $'''㎍
    μg'''
    Text.Replace Text: NewVar2 TextToFind: $'''㎍''' IsRegEx: False IgnoreCase: False ReplaceWith: $'''μg''' ActivateEscapeSequences: False Result=> NewVar2

     

     

    I tried to find the problematic symbol using the regular expression you provided, but it didn't work.

    So I left the "text to parse" as is and turned on the toggle for "use regular expression" and it worked perfectly.

     

     

    SET NewVar TO $'''fi
    fi'''
    Text.Replace Text: NewVar TextToFind: $'''fi''' IsRegEx: True IgnoreCase: False ReplaceWith: $'''fi''' ActivateEscapeSequences: False Result=> NewVar
    SET NewVar2 TO $'''㎍
    μg'''
    Text.Replace Text: NewVar2 TextToFind: $'''㎍''' IsRegEx: True IgnoreCase: False ReplaceWith: $'''μg''' ActivateEscapeSequences: False Result=> NewVar2

     

     

    Actually, there was also a replacement of a string containing "? ", so I didn't use regular expressions.

    But, I remembered the existence of an escape text creation action at the same time, so this problem seems to be solved successfully. Thank you.

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 259 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 177 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 136 Super User 2026 Season 2

Last 30 days Overall leaderboard