Evaluated proc rpost {tid str} { set result [http post http://www.reddit.com/api/comment "api_type=json&text=[urlencode $str]thing_id=$tid&uh=[modhash]&reddit_session=[rcookie]" "Cookie reddit_session=[urlencode [rcookie]];Domain=www.reddit.com;Path=/;"]; regexp -inline {&lt;a name=\"(.+?)"} $result}