|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Mon Jan 29, 2007 4:34 am
2 similar trigger patterns |
I have 2 similar trigger patterns, one being
~(o~)&oname~.
and
~(o~)&oname ~(*~)~.
I was wondering if there was an easy way to differentiate between these two, the items look like
(o)An item. or
(o)An item (enchanted).
the problem is the 1st trigger will catch both patterns so i get some spam, i tried using regex and [^()] but that just removed the last letter of the word instead. |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Mon Jan 29, 2007 5:12 am |
I'm not sure about ZMud patterns, but off the top of my head regex would be
^\(o\)(&oname:[^(]+)\.$ |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Jan 29, 2007 5:24 am |
&varname can be type-cast using other wildcards, but that's probably not going to help in your case. Perhaps the range pattern would fill your needs?
#trigger {~(o~)([%w%s])*.} {}
You might need to drop off the period at the end of the pattern, I don't recall for sure if * matches on "non-existent text". Also, you may need to add specific symbols to match all the other ones used in item names. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Jan 29, 2007 5:45 pm |
* works like .* in regex, matches any number including none.
|
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Tue Jan 30, 2007 2:44 am |
thanks, i was trying combinations with the &varname and not getting any luck. the ~(o~)([%w%s])*~. worked perfectly
|
|
|
|
|
|