Jul 11, 2006 #1 snowingnow Programmer Joined Jun 1, 2006 Messages 32 Location CA Hello, i would like to return all the elements in the list,whose string contains "empnum", tahnks
Jul 12, 2006 #2 Bong Programmer Joined Dec 22, 1999 Messages 2,063 Location US Code: foreach elem $list_a { if {[string first empnum $elem]>-1} { lappend newlist $elem } } _________________ Bob Rashkin Upvote 0 Downvote
Code: foreach elem $list_a { if {[string first empnum $elem]>-1} { lappend newlist $elem } } _________________ Bob Rashkin