Page 1 of 1

Regex For Speech in Emotes

Posted: Wed Aug 31, 2022 9:14 pm
by Julea
I'm not sure if anyone else will find this useful. But one of my sanity requirements for when I RP is colouring of speech. It helps break up the text so my eyes don't get lost, and more easily differentiate between action and speech. On most muds this isn't usually a problem to do, it's easy enough to create a regex and colour. But on TI, with the language being indicated in the colour of the first character, this poses a problem.

Anyways. I figured out a regex for excluding the first and last character. It is:

Code: Select all

(?<=(".))[^"]*(?=(.")(?:[^"]*"[^"]*")*[^"]*$)
In mushclient, it's pretty easy to plug this into the triggers and set up:

Image

And I understand it's pretty simple on Mudlet too.

Re: Regex For Speech in Emotes

Posted: Thu Sep 01, 2022 12:02 am
by astronamika
Julea wrote:
Wed Aug 31, 2022 9:14 pm
And I understand it's pretty simple on Mudlet too.
*nervously laughs in dumbass*