O_o Examples are... scary? But a regex might be better for the on text event.
on $*:text:/^.(add|del|search|last)?pline (\w+)$/Si:#: {