I have keyword in below format:
Day,Night,Afternoon,Evening
Black,Blue,Night,Green,Yellow
Red,Pink,Day,Afternoon
I need to compare all the keywords from line 2 and 3 with the keywords mentioned in line 1 and Extract the keywords that are matching with line 1. E.g Night from line 2 is matching with Line 1 and Day & Afternoon from line 3 is matching with the keywords present in LINE 1. Please suggest method for this.
Fine
Letβs take like
Str_input = β Day,Night,Afternoon,Evening
Black,Blue, Night ,Green,Yellow
Red,Pink, Day , Afternoonβ
Now use a assign activity like this arr_str = Str_input.Split(Environment.NewLine.ToArray())
Where arr_str is a variable of type array of string
βnow use another assign activity like this
list_str1 = (Split(arr_files(0).ToString,β,β).Intersect(Split(arr_files(1).ToString,β,β)).Tolist()
first take the second line split with , then loop through it and then you will get each item then check condition that item exist in line1 by line1_varible.constain(item) if this tru means that item is there in line 1 so store in another variable
Then we can get them with assign activity
Where we can save the in a string variable Like this str_var1 = dt.Rows(rowindex)(columnindex)
Where both rowindex and column index starts from 0 for first row and first column
Cheers @Anamika15