I’ve a scenario where in I’ve my string in multiple lines as below
str_Text=“test1 test2
test3 test4
test5 test6”
and I don’t want any empty values to be present in my split array. I’ve written the following expression:
str_Text.split({" "c,Environment.NewLine},StringSplitOptions.RemoveEmptyEntries).ToArray
Now My array looks like this
string[4]{“test1”,@“test2
test3”,@“test4
test5”,“test6”}
How can I get the last element in every line and the first element in newline split. I expect my array to have 6 elements which will look like
string[6]{“test1”,“test2”,“test3”,“test4”,“test5”,“test6”}
Thanks for the reply. I don’t see any change in output, I needed the output as
string[6]{“test1”,“test2”,“test3”,“test4”,“test5”,“test6”}
My motive is to split the value at the newline as well as a space in the string