|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4689 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sun Jan 02, 2011 7:12 pm |
In regex, it would be [^(deeply)]. Just a thought.
|
|
|
|
|
|