Trigger failing

Posted by Poromenos on Fri 26 Sep 2003 07:18 PM — 5 posts, 13,099 views.

Greece #0

<triggers>
  <trigger
   enabled="y"
   keep_evaluating="y"
   match="Hello there (.*?)"
   regexp="y"
   send_to="2"
   sequence="100"
   other_text_colour="black"
   other_back_colour="black"
  >
  <send>%1</send>
  </trigger>
</triggers>

This trigger matches, but doesn't send anything to output... To match, I use "Poromenos says 'Hello there Poromenos'", and nothing. What am I not seeing?
Amended on Fri 26 Sep 2003 07:22 PM by Poromenos
Australia Forum Administrator #1
Because you have turned off "greedy" matching the thing in the brackets is matching the minimal amount it can, not the maximum.

Try making the regular expression:

match="Hello there (.*)"

That matches better.
Greece #2
Are you sure this is it? Because I seem to remember turning it to a normal trigger and back to regexp, and it matched... Not sure though...
When you have "Hello (.*?)" isn't it supposed to match
there
on
Poromenos says: Hello there
?
Greece #3
But yes, I suppose that if it's non greedy it would match the rest of the line if i had the $ at the end...
Australia Forum Administrator #4
Yes, non-greedy in the middle of a line (without the $) is going to try to match a minimal amount.