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
➜ question about one trigger that can match two things
|
question about one trigger that can match two things
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Hefan
(12 posts) Bio
|
| Date
| Sun 22 Aug 2004 06:03 PM (UTC) |
| Message
| this is what i have
match="^((\d+)h, (\d+)m (\D{0,7})\-\s*|.?)You are blinded.*?$"
and i hope to use it to match either:
You are blinded.
or match:
2714h, 4205m ex-You are blinded.
but it won't work as i intended. is it possible to do something like this with one trigger? if it is,can anyone help me with this? Thanks
| | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #1 on Sun 22 Aug 2004 07:53 PM (UTC) Amended on Sun 22 Aug 2004 07:54 PM (UTC) by Flannel
|
| Message
| ^(\d+h\, \d+m ex\-)?You are blinded\.$
Youll have to add whitespace where needed, but that should work.
Er, You seem to indicate that the "ex" is also variable? If so, youll need to change the trigger to reflect that as well. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | Top |
|
| Posted by
| Hefan
(12 posts) Bio
|
| Date
| Reply #2 on Tue 24 Aug 2004 04:36 AM (UTC) |
| Message
| hmm..i tried what you said, but it seems the trigger still won't fire. this is what i have:
match="^(\d+h\, \d+m \D{0,7}\-)?\s*Your state of paralysis prevents you from doing that.*?$"
and the trigger can only fire when the message match:
Your state of paralysis prevents you from doing that.
but when the message matches:
2714h, 3670m cexkdb-Your state of paralysis prevents you from doing that.
the trigger won't fire.
any idea what is wrong? thanks | | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #3 on Tue 24 Aug 2004 07:00 AM (UTC) |
| Message
| Its obviously in that prefix. And its most likely something were overlooking. Like leading spaces, or spaces in between. Try just matching on that first part (dont have a $ at the end of your regexp, and dont do anything but change the color) to see if you can get something to match. The forum eats up whitespace, so I couldnt point you in the right direction if it was.
And you dont have that period at the end in your regexp. If you were planning on it or not. (you never check for a period.) |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | Top |
|
| Posted by
| Bobble
Canada (76 posts) Bio
|
| Date
| Reply #4 on Tue 24 Aug 2004 06:30 PM (UTC) |
| Message
| Just a question, but does that dash always appear in the prompt? If it always does (and is always the last prompt character) couldn't you try:
(^|\-)You are blinded\.$
I do something similar with Aetolia's prompt which looks slightly different but always ends with a ] character.
(^|\])You are blinded\.$
The rest of the information (the ex etc.) is inconsequential for the trigger, so you don't need to bother matching it. |
Open the watch. | | 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.
19,187 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top