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 / I had a variable conta...
Power Automate
Answered

I had a variable containing data "[Mithesh]" and i wanted to remove "[ ]" characters.

(0) ShareShare
ReportReport
Posted on by 162

how to remove "[ ]" from "[Mithesh]", so that my output will be Mithesh . I  can use two  replace functions , can i use only one to replace 2?
var1 = "[Mithesh]"

example:  replace(variables('var1'),'"[','')

replace(variables('var1'),']"','')

Categories:
  • Rhiassuring Profile Picture
    8,692 Moderator on at

    Yeah, you can nest it. replace(replace(variables('var1',']',''),'[','')

  • MitheshRpa Profile Picture
    162 on at

    MitheshRpa_0-1702013129939.png

    still getting error.

    replace(replace(variables('BeneficiaryFirstName','"]',''),'"[',''))

     

  • Verified answer
    Rhiassuring Profile Picture
    8,692 Moderator on at

    Your variable isn't wrapped. Try this:

     

    replace(replace(variables('BeneficiaryFirstName'),'"]',''),'"[',''))

     

     

    That's my fault, I notice I missed it in my example.

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 430

#2
11manish Profile Picture

11manish 341 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 282

Last 30 days Overall leaderboard