Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Solaras
Wanderer


Joined: 11 Mar 2002
Posts: 93

PostPosted: Sun Aug 31, 2003 4:30 am   

highlighting Absolute Values
 
I am trying to colour names of allies, but sometimes thier name appears as a portion of another word and that gets highlighted too. What is the syntax to say only highlight this name?

example ally name =
trigger Tamara
command #CW green

if a word like tamaranth shows up somewhere it highlights "tamara" in that word
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Sun Aug 31, 2003 6:37 pm   
 
"^" forcess pattern to match the bigining
"$" forcess pattern to match the ending
so
trigger Tamara$

zmud help files= pattern matching.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sun Aug 31, 2003 9:15 pm   
 
In order to limit the highlighting to whole words, you have to supply the preceding and following characters (which will also be highlighted). In other words, you'll need a pattern for every possible beginning with every possible ending. I suspect most people eventually decide it's not worth the extra patterns and just tolerate the highlighting of tamaranth.
#TR {^Tamara } {#CW green}
#TR {^Tamara%p} {#CW green}
#TR {^Tamara$} {#CW green}
#TR { Tamara } {#CW green}
#TR { Tamara%p} {#CW green}
#TR { Tamara$} {#CW green}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net