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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
werd26
Newbie


Joined: 18 Oct 2005
Posts: 7

PostPosted: Thu Apr 11, 2013 12:08 am   

Matching only the exact words for colorization
 
So I've been playing with #CW some and it seems whenever I make a trigger to color a word it also colors any instances of that word that is partially matched in another word?
Like say I color the word chest, and the word bchesttgol comes across the screen, the chest part of the word will still be colored green even though it isn't exactly the same word.
How do I get the trigger to only fire when the mud prints the exact word rather than chests or chestfoo etc.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Apr 11, 2013 2:43 am   
 
Use %q to match on word boundaries. %qchest%q will match the word chest, while %qchest will match on any word that starts with chest and chest%q will match on any word that ends with chest.
_________________
EDIT: I didn't like my old signature
Reply with quote
werd26
Newbie


Joined: 18 Oct 2005
Posts: 7

PostPosted: Sun Apr 21, 2013 6:19 am   
 
Thanks Matt.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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