Evaluated proc metatrigger str { set out ""; foreach tname [aa? triggers] { set t [first [aa triggers $tname]]; if { [third $t] == 1 && [regexp -inline [first $t] $str] != ""} { append out [eval [add_slashes [regexpb [first $t] $str [second $t]]]]\n } }; . $out}