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

split or extract string from string

if i have a string like this ["test@test1.com"] how to get the value only test@test1.com?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@tom_riha you don't even need to put it into an array variable. So you could just use an expression like:

first(outputs('string'))

Even without being in a array variable it will still get interpreted as an array.

View solution in original post

4 REPLIES 4
Dual Super User III
Dual Super User III

Use the following.  The substring starts after the second character (removing the [") and the Length-4 stops before the final two characters (removing the "])

substring(variables('target String'),2,sub(length(variables('target String')),4))

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Super User II
Super User II

Hello @AdhamFH ,

the string has format of an array with a single object, so you could also store it into an array variable and then get the first object (on index 0) from that array. Or use 'Apply to each' if you expect there might be multiple strings, e.g. ["test@test1.com","test2@test1.com"...].

image.png

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ ... and if you like my response, you might like also the tips and solutions on my Power Automate related blog ]
Super User III
Super User III

@tom_riha you don't even need to put it into an array variable. So you could just use an expression like:

first(outputs('string'))

Even without being in a array variable it will still get interpreted as an array.

View solution in original post

Hello @Paulie78 ,

thank you for the tip, that seems to be the optimal solution. 🙂



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ ... and if you like my response, you might like also the tips and solutions on my Power Automate related blog ]

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

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!

Users online (1,189)