The Mud I once played (before I got into coding for Mudlet
) reports the Room Name in Cyan on Black - so it is relatively straightforward to have a Trigger to detect that - at least since I fixed the bug that prevented dark-cyan and bright-white {see Bug Report
#1103645 and PRs
#235 (development)
#256 (release_30) } foreground colour triggers from working.
The trouble I am having is that the Immortals also use that colour for their pronouncements - I have a PCRE which will detect THOSE as:
Code: Select all
^(\w+) speaks from the (\w+): '(.*)')$
but how do I ensure that lines that DO match this pattern DO NOT fire a trigger that is to pass "Room Names"?
I did think that the PCRE negative look ahead
(?!...
) might do this so that I would use this as a second line below the Color Trigger:
Code: Select all
^(?!((\w+) speaks from the (\w+): '(.*)'))$
but that does not work as far as I can tell using
https://www.regex101.com/ - so how can I match:
CYAN text which is anything EXCEPT the form:
WORD speaks from the WORD: 'SENTENCE'