我想用 \t
=
或分割线,
我尝试使用:
set line [split $line" \t=,"]
set result {}
foreach element $line {
if { $element != {} } {
lappend result $element
}
}
线条看起来像:
name1 name2 name3 floating_point_number1, floating_point_number2
或者
name = floating_point_number1, floating_point_number2 ... floating_point_numbern-1, floating_point_numbern
但它似乎很慢。如何更改代码以更有效?