Multiple triggers in a single string of characters

Posted by Navazr on Fri 06 Dec 2013 10:51 PM — 2 posts, 12,807 views.

#0
Hi!

I'm trying to trigger off of a code output line from the MUD I'm playing that displays the current exits of the room I'm in in the following format:

###exits no0ea0so0we0

In this example, there are exits NORTH, EAST, SOUTH and WEST (the 0s after "no" "ea" etc indicate it is an open exit with no doorways or obstructions. If one of those exits, say north, was through an open or closed door, the output would read the same but the number after "no" would be 1 or 3.

Is there a way to trigger off of "no0" within a big string of characters like that?

I've tried just dumping wildcards in front of and behind it, but it doesn't seem to work.
Australia Forum Administrator #1
Show us what you tried?

A regular expression could easily match "no0".

Template:regexp
Regular expressions
  • Regular expressions (as used in triggers and aliases) are documented on the Regular expression tips forum page.
  • Also see how Lua string matching patterns work, as documented on the Lua string.find page.