Evaluated proc said args {set pattern [join ${args}]; set logs [raw_irclog]; set matches [list]; foreach line $logs { if {regexp $pattern [lindex $line 3]} {, $matches $line}}; . $matches}