Annoying Percentages

Posted by Tamalak on Wed 16 May 2001 05:48 PM — 2 posts, 12,706 views.

#0
I am having difficulty using the wildcards (%1, %2, etc). I was unable to find a HELP topic clearly explaining their use in triggers.

What I want to do is make a trigger that responds to the MUD like so:

MUDTEXT: Ragnor disbands his group.
COMMAND: Follow Ragnor

I made the trigger: ^.+ disbands his group.
and I made the send: follow %1

I checked "Enabled" and "Regular expression"

When I tried the trigger, the client only inputted "follow". I changed the send to "follow %2" but that didn't work either. How exactly are these cards used? Sorry if this is (another) stupid question!!
Australia Forum Administrator #1
You need to use brackets to tell the regular expression to "output" the match. This way some wildcards can return (as %1, %2 etc.) and others not.

Just change your regular expression to:

^(.+) disbands his group.


and then send: follow %1