proc design_status { line } { global properties #puts $line regsub -all { } $line {} line foreach property { Report Design Version Date } { if { [regexp "$property" $line] } { regsub -all "$property|:" $line {} line set properties($property) $line puts "$properties($property)" puts "$properties(Report)" } } #puts "$properties(Report)" } Report : surface Design : FE.993 Version: 0.83 Date : Fri Mar 7 12:23:08 2008