Try this if it works as expected. set outputchan "#debug" bind raw - NOTICE server:notices proc server:notices {from keyword text} { global outputchan set text [regsub -all -- {\s{2,}} [string trim [stripcodes * $text]] { }] if {[regexp -nocase { REMOTECONNECT: Client connecting at (\S+\:)...