Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Multiple triggers in a single string of characters
|
Multiple triggers in a single string of characters
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Navazr
(15 posts) Bio
|
| Date
| Fri 06 Dec 2013 10:51 PM (UTC) |
| Message
| 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. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sat 07 Dec 2013 10:11 PM (UTC) |
| Message
| Show us what you tried?
A regular expression could easily match "no0".
 |
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.
|
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
12,147 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top