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 ➜ Regexp Trigger Problem

Regexp Trigger Problem

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


Posted by David Berthiaume   (202 posts)  Bio
Date Fri 17 Dec 2004 03:30 AM (UTC)

Amended on Fri 17 Dec 2004 03:31 AM (UTC) by David Berthiaume

Message
As you know from other posts, my skills look like this:
Name           Mastery   Name           Mastery   Name           Mastery
Advanced polea sliver    Advanced sword advanced  Polearm        sliver    
Kick           average   Expert polearm sliver    Sword          expert    
Expert sword   advanced  Sneak          sliver    Trip           sliver

Now I have regexp triggers to colour the mastery parts of the skills various colours. red, blue, green, yellow, etc, etc.

Anyways, I had a problem with Advanced sword, it would colourize the Advanced, I fixed that by making it case sensitive. However, Blademaster is a problem.

How would I make it so that it would only colour the mastery if it was by itself, and not linked with any other words. Like Blademaster
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 17 Dec 2004 04:31 AM (UTC)
Message
Read the regexp docs, they have heaps of interesting stuff in them. In your case you want a "word boundary" assertion, like this:

\bmaster\b

The \b says "assert that this is a word boundary". That works for me on Blademaster.

- 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,382 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.