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