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
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4672
Location: Pensacola, FL, USA

PostPosted: Sun Jan 02, 2011 3:25 pm   

Pattern Exclusions
 
What is the proper pattern to match a string that doesn't end in a given word?

I had thought it was:
Code:
sink{s|} (*[^deeply]) into the ground as {he|she|you} continue to dig

put the pattern doesn't seem to match

I want to be able to distinguish between two triggers where the only difference is the word 'deeply', and i don't want the more generic trigger to fire when it is present.

I could internalize the test and have one trigger for both scenarios, but for arguments sake, I want to know if this can be done via the pattern using regular zscript.

P.S. I have managed to simulate the effect I want by giving the more precise pattern a higher priority and checking the stop further processing box. Still wondering about getting the pattern more precise though.
_________________
Discord: Shalimarwildcat
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Jan 02, 2011 3:51 pm   
 
Use {} instead of []. [] is the range pattern, so your pattern was looking for any combination of ^deply.
_________________
EDIT: I didn't like my old signature
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sun Jan 02, 2011 7:12 pm   
 
In regex, it would be [^(deeply)]. Just a thought.
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