trigger matching text

Posted by Thebloodsiren on Fri 24 May 2002 06:00 AM — 2 posts, 12,907 views.

#0
Probably just me but i cant work out how to make a trigger to catch this text:

(A|An) <wildcard1> (male|female) <wildcard2> in from the <wildcard3>.

So then it would match for the following text:
An orange-eyed male human walks in from the west.
That would match:
<wildcard1> = orange-eyed
<wildcard2> = human walks
<wildcard3> = west

Little help please.
Thanx
Australia Forum Administrator #1
To use "A" or "An" you have committed to regular expressions, so we'll do it with them. :)

To get wildcards you need to put the text in brackets, however you don't care about wildcards 1 and 3, so just ignore them. The trigger would be like this:


<triggers>
  <trigger
   custom_colour="2"
   enabled="y"
   match="(A|An) (.*) (male|female) (.*) in from the (.*). "
   regexp="y"
   send_to="2"
   sequence="100"
  >
  <send>wildcard 2 = %2
wildcard 4 = %4
wildcard 5 = %5
</send>
  </trigger>
</triggers>