Extract specific information from a message

Hello All,
i have a message containing few lines .
I want to put what is in yellow in variables so that i can use them later .
so i need to extract for example test( as user name) and put it in a variable, and the same for Email address and phone number .
Capture .
Any help please!

Hi @teyssir

you need to use split function on your string

try this syntax in an assign

yourStringArray = yourString.split({"User name:","Email address:","Phone number:"},StringSplitOptions.RemoveEmptyEntries)

Where yourStringArray is an array of strings that will contain each member of your information as an element


Hi @reda
Thank you for answering , but it is giving me wrong results.
I have assigned theString array and for each item i used item.tostring in a message box to see the result but it is not extracting the information needed

Okay check this :
Main.xaml (7.6 KB)

It is giving me the expected results

I am not able to open your workflowCapture

go to manage packages and update the official packages from here :

I have updated the packages but still the same issue!
Here is mi workflow
Main.xaml (6.8 KB)

In this process the msg variable contains**Computer name:** and not Email address: like in the first post

1 Like

You are right!
I didn’t pay attention to that , Thank you .
and is it possible to put each information in one single variable!

yes try with this one :
msg.split({"User name:","Email address:","Phone number:","Computer name:"},StringSplitOptions.RemoveEmptyEntries)

[please close thread by marking the right answer as solution]

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.