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
aedron
Beginner


Joined: 29 Nov 2008
Posts: 20

PostPosted: Fri Dec 26, 2008 12:06 pm   

Capturing words
 
Is there a function in zmud that lets me tell zmud that I want the reflex to only fire its specified value if its a word, and not -in- a word? For example..

I reflex my friends' names. Let's say the reflex is: Aedron
and the value is: #cw green
Zmud will, however, colour code that name green even if its part of a word (Like if someone elses name was Gyraedronite it would highlight the aedron in that name green) Is there a function that ican use to tell zmud I only want that reflex highlighted if its a word and not -part- of a word?

Thanks!
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Fri Dec 26, 2008 2:18 pm   
 
Word boundary is what you're looking for.

I think it's %q in Zscript, \b in Regex.

Basically you'd have a trigger then:

Code:


#trigger {%qAedron%q} {#cw green}



And it will only color when it sees the word alone.
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
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