Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string matching

Status
Not open for further replies.

snowingnow

Programmer
Jun 1, 2006
32
0
0
CA
Hello, i would like to return all the elements in the list,whose string contains "empnum", tahnks
 
Code:
foreach elem $list_a {
  if {[string first empnum $elem]>-1} {
     lappend newlist $elem
  }
}

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top