gagging multiple line triggers

Posted by Jimbob on Mon 23 Feb 2009 01:21 PM — 3 posts, 17,180 views.

#0
If I have a multiline trigger like the following
^line1\nline2\z

Is it possible to gat both line1 and line2?
Netherlands #1
Yes it is possible. Although I am not sure what you mean 'get both line1 and line2.'

If you mean you want them captured as %1 and %2, make it a regular expression like... ^(Line1)\n(Line2)\z

If the problem is getting the trigger to work, you may just need to turn multi-line on, and set lines to match to 2.


Edit: oi, I need to read better. I totally didn't read (or realize the contents of) the subject line. :(
Amended on Mon 23 Feb 2009 07:03 PM by Worstje
USA #2
Gagging them isn't as straight forward as just the check box "Omit from Output".

You could script out a call to "DeleteLines" and remove the last 2 lines on match with the one mutliline trigger.

Alternatively, 2 triggers would probably be easier.
^line1$
omit_from_output = 'y'
<send> EnableTrigger "GagLine2" </send>

and

^line2$
name="GagLine2"
omit_from_output="y"
<send>EnableTrigger ("GagLine2", false) </send>