[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  I should know this too...
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

I should know this too...

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


Posted by David Berthiaume   (202 posts)  [Biography] 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.
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] 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
[Go to top] 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.


3,711 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]