|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Fri Oct 31, 2008 5:40 pm
Pattern Matching From a Var |
Ok, heres the situation...
I have a list var, and I'm matching it in a trigger pattern.
#TRIG {{@List}} {bah}
Now, say George is part of the list...
How do I STOP it from triggering on Georgette? |
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Oct 31, 2008 6:22 pm |
Use the pattern %q{@List}%q. %q is an analogue of the \b regex, which is a zero-length character. It matches the space between a word character (a-z0-9) and something that's not a word character (anything else). So it'll match George only if it's preceded by, say, a space or the beginning of the string. But %q doesn't match a character; it matches a space between characters, so anything you do with the match afterwards won't be screwed up by it.
|
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Fri Oct 31, 2008 8:26 pm |
Ok, I knew there was a way to do it, but I couldn't remember. Thanks Fang.
|
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
|
|