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