Hello,
Removing elements from a list is well documented in the the JSL discussions but for some reason I cannot figure out how to do this:
I need to remove elements from a list if the elements CONTAIN string from another list (not exact match).
Example below: I am trying to remove all elements that contain "Cal" or "Blue"
Thanks in advance,
-Voiz
Names Default To Here( 1 );
clear symbols();
Deletesymbols();
ChosenDataCol = {"Cal1", "Cal2", "Cal3", "Temp1", "Temp25", "Blue56", "Blue32", "Blue95"};
RemoveCol = {"Cal", "Blue"};
For (i=1,i<=N Items( RemoveCol ), i++,
For (j=N Items (ChosenDataCol), j<=1, j--,
If(contains(ChosenDataCol[j], Eval(RemoveCol[i]))==1,
Remove from(ChosenDataCol, j)
)
)
);
show (ChosenDataCol);