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.
 Entire forum ➜ MUSHclient ➜ General ➜ Hightlight a word, but only when it appears between special characters.

Hightlight a word, but only when it appears between special characters.

Posting of new messages is disabled at present.

Refresh page


Posted by Mesarthim   (1 post)  Bio
Date Fri 15 Sep 2023 08:57 PM (UTC)
Message
Hi there. I've figured out how to highlight words. As an example, I can highlight 'Public' in cyan, and that's great for visibility. But every time I walk into a new room, all instances of public are highlighted and that isn't what I need. I just want chat spam in the [Public] channel to be highlighted.

That's simple enough, add the [ and ] to the word and it's highlighted. But I don't want those characters highlighted. Only the word, but only the word when it's surrounded by those characters. How can I accomplish this?
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 16 Sep 2023 10:45 PM (UTC)
Message
Put a backslash before the square brackets, ie.

\[Public\]

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


2,319 views.

Posting of new messages is disabled at present.

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.