[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]  A trigger question
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

A trigger question

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

Posted by Helio   (9 posts)  [Biography] bio
Date Wed 23 Oct 2002 02:20 PM (UTC)
I having this problem with some triggers..
Oky, so far this is my trigger,
I trigger these names so that they change to the colour red when it appears on the output.
Ie: Tom the Hairball ( Tom would be in red )
However, it seems that the client colours anything with the words in the trigger present, for instance Jackal, since it contains Jack thus the Jack is coloured red and -al in Jackal is left unchanged. How can i do it such that the trigger only colours Jack and not Jack-al.
[Go to top] top

Posted by Vaejor   (120 posts)  [Biography] bio
Date Reply #1 on Wed 23 Oct 2002 10:54 PM (UTC)

Amended on Wed 23 Oct 2002 10:55 PM (UTC) by Vaejor

How about:

"(John|Jack|Tom|Harry)(?: |$)"

Without the quotes.

I tried minimal testing on it and it seems to work.

Basically it checks for a space or end of line after the name to make sure there's no more letters.
[Go to top] top

Posted by Nick Gammon   Australia  (21,652 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Wed 23 Oct 2002 11:22 PM (UTC)
Try this:


The \b says "assert this is a word boundary".

Read the file RegularExpressions.txt that comes with MUSHclient for more details about the fancy things you can do with regular expressions.

This will catch other things (eg. name followed by period, comma etc.)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[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.


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.


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]