Evaluated proc metatrigger str { set out ""; foreach tname [aa? triggers] { set t [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}