Evaluated proc rr sub { set src [wget http://www.reddit.com/r/$sub.json]; set re [regexp -all -inline {id": "(.+?)".+?title": "(.+?)".+?url": "(.+?)"} $src]; set result ""; for {set i 1} {$i < [llength $re]} {incr i 3} { append result "[# $re $i] [# $re [+ $i 1]] [# $re [+ $i 2]]\n"} }; . $result}