[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]  Colour trigger in specific circumstances
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

Colour trigger in specific circumstances

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

Posted by Clomly   (2 posts)  [Biography] bio
Date Sun 21 Oct 2007 10:33 PM (UTC)
Sorry if this has been covered before. I searched but couldn't find anything on it.
I'm trying to make a colour trigger that will highlight a single word (or multiple words in one line if they match a list) but only if the line ends in a certain string (which I do not want highlighted).
Ie. a line such as
A young Ephebian recruit, two skinny Ephebian recruits, a nervous Djelian recruit, a skinny Djelian recruit and a disciplined Ephebian soldier are fighting here.
I would like to highlight recruit and soldier every time they appear, but only if the line ends in "here."
I've managed the recruit and soldier part (just match soldier|recruit|recruits|etc) but can't seem to make it conditional.
Thanks in advance,
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #1 on Tue 23 Oct 2007 02:37 AM (UTC)
This trigger seems to do the job:

   match="(soldier|recruit|recruits)+(?=.*? are fighting here\.$)"

Note the 'repeat on same line' option.
[Go to top] top

Posted by Clomly   (2 posts)  [Biography] bio
Date Reply #2 on Tue 23 Oct 2007 06:15 AM (UTC)
Thank you.
[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]