cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

How to take out [ ] in a string?

Hello,

 I have a Text field (multiple lines)  with the values:

Mary Jane
John Doe
Joey bone

In the flow, will send a email with this values ,

I used "split" function got sting :  ["Mary Jane\nJohn Doe\nJoey bone\n"]

I used replace got it as below"

["Mary Jane
John Doe
Joey bone

]"

 

Now I don't know how to take out ["     and ]" to make it like:

Mary Jane
John Doe
Joey bone

I do appreciate any ideas, Many thanks,

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

If it is just to go in an email, don't bother with the split (your split didn't really do anything anyway). Try this instead:

replace(outputs('EmailAddresses'), decodeUriComponent('%0A'), '<br>')

The new lines are replaced with <br> which is what you would need in an email to create a new line. Output is this:

Mary Jane<br>John Doe<br>Joey bone

Which when placed in an email will give you the result that you want.

View solution in original post

4 REPLIES 4
Super User III
Super User III

If it is just to go in an email, don't bother with the split (your split didn't really do anything anyway). Try this instead:

replace(outputs('EmailAddresses'), decodeUriComponent('%0A'), '<br>')

The new lines are replaced with <br> which is what you would need in an email to create a new line. Output is this:

Mary Jane<br>John Doe<br>Joey bone

Which when placed in an email will give you the result that you want.

View solution in original post

WOW😃, you are the best Paulie78, it works perfectly. Soooo happy. Thank you very much!!! 🙏

Super User III
Super User III

Thanks @Linda777  So, it is solved? Can you press that little solved button? 😋

Hi Pailie78,
I am so sorry for missed that step, I though 👍 only this one. I just did. once again thanks for help me fixing the issue   quickly. 🙂

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (7,071)