Trigger text with the [ and ] symbols

Posted by Christian Landry on Sat 07 Dec 2002 07:59 PM — 3 posts, 14,088 views.

Canada #0
I'm trying to get the words [Public] to be highlighted in blue. However when I use [ and ] only the letter P is highlighted, and when I use only Public, every instance of the word is highlighted, no matter what.

So I figure I have to write [ and ] in a specific way. I couldn't find any document that showed me how.
Australia Forum Administrator #1
I presume you have regular expressions turned on? There is a file "RegularExpressions.txt" that ships with MUSHclient that describes them in detail.

Your problem is that the square brackets are for "sets" of characters, eg. "[Public]" will match on "P" or "u" or "b" or "l" or "i" or "c".

You need to "escape" them to match literally on the brackets, like this:

\[Public\]

Canada #2
Thanks, that's exactly what I was looking for.