Register forum user name Search FAQ

Gammon Forum

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 ➜ I should know this too...

I should know this too...

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by David Berthiaume   (202 posts)  Bio
Date Wed 13 Apr 2005 08:20 AM (UTC)

Amended on Wed 13 Apr 2005 08:21 AM (UTC) by David Berthiaume

Message
Ok, then, I got a trigger I need to set a variable. That part is easy. The tricky part is making it work.
| Name:Tubur       Hero Level:317            Align:Chaotic-Good      |

Thats the line.

In that line, I want to match only the Hero Level:317


Now, I can make it highlight it just fine, using \d+

But I need that nmber to be a wildcard. As soon as I do, it highlights the Align part as well, which is useless to me. I suppose I could make the entire line a trigger, but that kinda seems to be a bloated trigger.
Top

Posted by Ked   Russia  (524 posts)  Bio
Date Reply #1 on Wed 13 Apr 2005 11:04 AM (UTC)
Message
Actually, a partial trigger is going to be more "bloated" than the one that matches the entire line, due to how regular expressions are processed. You always want to try to make the trigger as specific as possible. But in this case you can only use a partial trigger. Try:

\sHero Level:(\d+)\s
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.


11,448 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.