![](templates/Classic/images/spacer.gif) |
werd26 Newbie
Joined: 18 Oct 2005 Posts: 7
|
Posted: 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. |
|
|
![](templates/Classic/images/spacer.gif) |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
![](templates/Classic/images/spacer.gif) |
werd26 Newbie
Joined: 18 Oct 2005 Posts: 7
|
Posted: Sun Apr 21, 2013 6:19 am |
Thanks Matt.
|
|
|
![](templates/Classic/images/spacer.gif) |
|
|