Open jackjindtnt opened 6 years ago
set a [open myfile] set lines [split [read $a] "\n"] close $a foreach line $lines { if {[string match {[0-9]} $line]} { puts $line regexp -inline {\S+} $line set s1 [lindex $line 1] if {[string match .* $s1]} { set s2 [lindex [split $s1 "."] 0] puts $s2 } else { puts $s1 } } }
set a [open myfile] set lines [split [read $a] "\n"] close $a foreach line $lines { if {[string match {[0-9]} $line]} { puts $line regexp -inline {\S+} $line set s1 [lindex $line 1] if {[string match .* $s1]} { set s2 [lindex [split $s1 "."] 0] puts $s2 } else { puts $s1 } } }