Hello, I have the next output through a for each that is stored in a System.Collections.Generic.List variable.
How can I delete the blank spaces from beginning and from the end of the output and also how can I split it by the last / so in the final should look like 2006, 2020 , 2019 ?
Blank space J24/1368/2006 blank space
,
blank space J22/359/2020 blank space
,
J23/4908/2019
,
J19/303/2018
Also, what is the data type of your variable mystring. It appears that is not string but List(String)
And, please elaborate a little on your requirement what is the actual input and the required output. Are you iterating over this list of string and performing the operation on the each string item?
The thing is that in a for each i`m extracting some data in a variabiale ( A ) wich I wanna add to a list by add to collection and then i wanna save the output by the last data after the / (2006,2008,2009)
I made a workflow that works exactly as you wanted it to with your output but i cant seem to post it because iam new. So what you want to do.
create a new list extra one,
in the for each create a assign type string with for example: strRemove = item.Replace(β,β ββ) (this will remove the ,)
after that create a second assign type array string, for example strTest = strRemove,Split("/"c) (this will split the string on /)
After that use the activity add to collection in the for each: in the collection input your new list, and in the item input the strtest(2).Trim (add collection makes it possible to add a string to the list, the number 2 indicates the position in the array so that we can grab the last date and trim will remove the spaces)
after that put a writeline outside the for each and put in there string.Join(β,β, Newlistname)
Never mind, i kinda made it work.
It just needed an Assign on variable A with Var.Replace(" β,ββ).Split(β/"c).Last
The only thing now is that is keep writing it on a new line. like : 2006
,2020
,2019