Evaluated proc ascii2map str { set out [list]; set chunks [split $str "\x03"]; foreach chunk $chunks { set re [regexp -inline {(\d+)*(,(\d+))*(.+)$} $chunk]; linsert $out end [dfl [lindex $re 1] -] [dfl [lindex $re 3] -] [lindex $re 4] }; . $out }