Matching Exactly what shows

Posted by Halig on Tue 10 Mar 2015 05:00 PM — 4 posts, 16,008 views.

Portugal #0
Hi again. I've been trying to set this trigger up, but i can't manage to match exactly that.

<triggers>
<trigger
enabled="y"
group="World"
match="Huh?"
regexp="y"
send_to="12"
sequence="100"
>
<send>ColourNote ("green", "white", "Press F11 for help!!!")</send>
</trigger>
</triggers>

I need to match exactly "Huh?", but for example i have something in my inventory that has Humming on it and it matchs it too. I need the trigger to match only that sentence.
Thank you.
Australia Forum Administrator #1
Don't use a regular expression. Uncheck that box.

Then it matches Huh? and nothing else.
Australia Forum Administrator #2
The regexp:


Huh?


Matches "Hu" followed by an optional "h" which is why it matched "Humming".

If you really wanted to use a regular expression, escape the ? like this:


Huh\?
Portugal #3
Thank you Nick. It worked. It took my long time to try to figure that out. Thank you again.