Regex For Speech in Emotes
Posted: Wed Aug 31, 2022 9:14 pm
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:
In mushclient, it's pretty easy to plug this into the triggers and set up:
And I understand it's pretty simple on Mudlet too.
Anyways. I figured out a regex for excluding the first and last character. It is:
Code: Select all
(?<=(".))[^"]*(?=(.")(?:[^"]*"[^"]*")*[^"]*$)
And I understand it's pretty simple on Mudlet too.