Hii, Please help ASAP, its little urgent
I have a string in this format (datatype: String).
“”,,,
Expected Result : I want this data into list
List(String) = Jack, Rome, Mile, Bow
Please help me into this.
Hii, Please help ASAP, its little urgent
I have a string in this format (datatype: String).
“”,,,
Expected Result : I want this data into list
List(String) = Jack, Rome, Mile, Bow
Please help me into this.
“,,,”
What is your expected output @Dummy . Please provide input and output as your query is confusing.
Regards
Sorry I don’t know why it is not accepting angular brackets.
This data are enclosed in separate angular bracket .Each angular bracket is separated by comma.
Above Screen shot is input
Output: List(String) = Jack,Rome,Mile,Bow
Hi There,
Use split function.
Your_String = “,”
or
Your_String = “Jack, Rome, Mile, Bow”
I believe the 2nd one is your requirement.
For that List_1 = Your_String.split(“,”)
Hope this helps you. Please elaborate the input if you need more clarity or the exact functions to use.
Good Day,
Rama Krishna Dokina
Hi @Dummy
You can simple use Replace function for that
inputString = "<Jack>, <Rome>, <Mile>, <Bow>"
outputString = InputString.Replace("<", "").Replace(">", "").Split(","c).Select(Function(s) s.Trim()).ToList()
outputString
isof DataType System.Collections.Generic.List(Of System.String)
Hope you understand!! @Dummy
Regards
Hi @Dummy ,
Hope it helps you
New_List: (List)
your_Var.Split(","c).Select(Function(s) s.Trim("<"c, ">"c)).ToList()
Output: (String)
String.Join(",",New_List)
Regards,
Vinit Mhatre
Sorry, Every approach is correct, but I wanted it more dynamic solution.
As I cannot use Split, Replace,Remove functions.
Can we achieve it through Regex.
Like anything available between angular bracket should extract.
Hi @Dummy
Try this
String.Join(", ",System.Text.RegularExpressions.Regex.Matches(Input,"(?<=\<)\w+(?=\>)"))
Cheers!!
Hii Thank you for the approach.
Let me explain you the real scenario.
Basically I wanted to extract the email Ids from outlook email.
I have extracted the email Id using emailId.To.ToString.
As there are multiple recipients present over there so string is comming out as
But I just wanted email Id to be extracted. only the content between angular brackets.
I hope you might get the point now.
use this regex and loop through results
Hii @Dummy,
might be this is helpful to you,
Thank you,
Akhil
Hii @Dummy,
I have one solution for you for extracting the email ID from your string.
Use another Assign Activity (or you can use multiple Assign Activity).
Use Message Box/or Log Message Activity to verify your output
I hope this is helpful to you.
Cheers buddy.
Akhil