Evaluated proc rpic name { . http://i.imgur.com/[rpick [string map {http:// {} www {} imgur {} com {} . {} / {} # {} jpg {} png {} gif {} , { }} [regsub -all {\d} [pics $name] ""]]].jpg }