Hi,
Can anyone let me know how to find a pattern in a string which is comma seperated. With my limited knowledge of TCL, I figured out a way of doing it through the split command and compare each resulting string, however I do not wish to iterate so many times. Is there a shorter way of doing it.
S1 is "1,2,3,A,B,C" (I have a for each loop for this one)
S2 is "A,B,C,D,E,F,G"
I have a for each loop to pick up every individual elements in String S1, but I need a short cut (if there is one) to directly search for every value (of S1 picked up in the for loop) in S2 directly without having to loop through S2 one more time.
Any help would be highly appreciated.
Thanks,
Can anyone let me know how to find a pattern in a string which is comma seperated. With my limited knowledge of TCL, I figured out a way of doing it through the split command and compare each resulting string, however I do not wish to iterate so many times. Is there a shorter way of doing it.
S1 is "1,2,3,A,B,C" (I have a for each loop for this one)
S2 is "A,B,C,D,E,F,G"
I have a for each loop to pick up every individual elements in String S1, but I need a short cut (if there is one) to directly search for every value (of S1 picked up in the for loop) in S2 directly without having to loop through S2 one more time.
Any help would be highly appreciated.
Thanks,