How to split the string data


i have a string as From :
hello world
i want to extract the data as, as between the < > .

ihave tried as string.split({"<"},stringsplitoptions.none)
but i am getting the data as

so.pls suggest me the solution , Thanks in advance

Extracting letters from a word/string

HI @lalithya14,

If you are reading the data from notepad.
you can use Read Text File Activity, it will return the String value.
after getting the value using split Environment.NewLine option spit the value to array
For loop through the array value you can get the each value.
To split the data use below code
arrvalue= strvalue.Split(Environment.NewLine.ToArray, StringSplitOptions.RemoveEmptyEntries)

use “c” after <



Hi arivu,
string.split({"<"c},stringsplitoptions.none) i have used in my case but its not working

i have a string as From :
hello world
here i want to get only the data between < > so, i have tried
string.split({"<"c},stringsplitoptions.none) but its giving me

                                   2/18/2018.   data


@lalithya14, Use this , This one works

String.Split(new string() {"<",">"}, StringSplitOptions.RemoveEmptyEntries)(1)

Dominic :slight_smile:


Hi @lalithya14,
Try this code

stringVal.Split('<', '>')[1]



thanks for your answer but i am not getting the output please help me

please find the attachments cs.xaml (6.8 KB)


its not working i am getting the data as
hello world

till < i am getting the data


You really just needed to .Split it twice and on the second one use the (0) item, like .Split()(1).Split()(0), and use “<” in the first and “>” in the second.

You can also consider a Regex pattern to pull out the email.

or use .Matches if there’s many email addresses in the text and it will create a list of the matches.


Invoke code for string variable

Hi @lalithya14,
Try this code

strValue.Substring( strValue.IndexOf("<")+1, strValue.IndexOf(">")-(strValue.IndexOf("<")+1))



thanks arivu