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
➜ Trigger Matching with Regular Expression
Trigger Matching with Regular Expression
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Mik0la
(2 posts) Bio
|
Date
| Thu 22 Jan 2009 07:13 PM (UTC) Amended on Thu 22 Jan 2009 07:47 PM (UTC) by Nick Gammon
|
Message
| I am attempting to omit from output certain characters that appear as a result of an update of my health and who bars. I have read through the regular expression post and have fiddled around tirelessly trying to get the phrases to match.
The single lines appear like this:
"1594 994> @1594@1594@ "
"1594 994 > ! "
If it is not posted correctly, there should be many spaces before and after the "@1594@1594@" and "!".
The prompt is variable to change and so are the numbers enclosed in "@" signs.
I have already tried the following and almost every variation thereof:
<trigger
enabled="y"
match="^(.*?)(.*?) >*!*"
omit_from_log="y"
omit_from_output="y"
script="on_reset"
send_to="12"
sequence="100"
>
</trigger>
<trigger
enabled="y"
match="^(.*?)(.*?) >*@(\d{1,4})@(\d{1,4})@*"
omit_from_log="y"
omit_from_output="y"
script="on_reset"
send_to="12"
sequence="100"
>
</trigger>
As of now nothing gets omitted and I just want those two instances to be gagged. I know for a fact that the prompt part of the trigger matches because I use it for my "Chat Redirection" plugin, but not sure exactly how to match the rest of the phrase. Help of any kind would be greatly appreciated. Thank you very much. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Thu 22 Jan 2009 07:48 PM (UTC) |
Message
| You need to check the regular expression box in the trigger dialog. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Mik0la
(2 posts) Bio
|
Date
| Reply #2 on Fri 23 Jan 2009 05:55 AM (UTC) |
Message
| Wow, I'm sorry I missed something so obvious. Well now that I've got that fixed I've encountered a whole new set of problems, but I guess I'll fiddle with this for awhile before I ask for more help. Thank you very much though. | 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.
9,464 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top