Page 1 of 1

{C} token

Posted: Mon Jul 16, 2012 8:35 pm
by AnonymousHero
Does not seem to be compatible with Regular Expressions...

I tried to make a AT that would let me know when someone is giving me a rez and stuff like ^*[Rr][Ee][Zz]*{C}*$ wasnt working

Re: {C} token

Posted: Mon Jul 16, 2012 10:00 pm
by Gimagukk
It definitely works with regex (string gets replaced before regex is applied, and I use that in the Sep4 triggers). I think the issue in your expression is that you need .* instead of * for your wildcard. The * directive says "0 or more occurrances of the previous character", which in your expression means 0+ Z's, and effectively 0+ of the last character in the player's name.

Re: {C} token

Posted: Tue Jul 17, 2012 7:25 pm
by Gimagukk
Also, I should note -- GINA uses case-insensitive comparisons for trigger matches (both for regex and non-regex triggers), so you can shorten your trigger to the following:

^.*rez.*{C}.*$

In some cases, including the ^ and $ anchor criteria increase the matching speed of a string, but since most of the line is wildcarded here, you'll probably actually get better performance shortening it even further to just:

rez.+{C}

I usually use this page to test out my expressions when I am troubleshooting them. Note that {C} is replaced with your character's name before the regex is applied, so just put your character name in in place of {C} when testing with this page.