TCL里默认的split函数是以单个字符为分隔符对字符串进行分割,下面的程序实现了用多个字符的字符串对目标字符串进行split:
proc wsplit {str sep} { split [string map [list $sep \0] $str] \0 }
split [regsub -all {\s+} "a b" " "]