{C} token

Post Reply
AnonymousHero
Posts: 6
Joined: Sun Jul 08, 2012 11:43 pm

{C} token

Post by AnonymousHero » Mon Jul 16, 2012 8:35 pm

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

Gimagukk
Site Admin
Posts: 237
Joined: Wed Oct 26, 2011 9:29 pm

Re: {C} token

Post by Gimagukk » Mon Jul 16, 2012 10:00 pm

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.

Gimagukk
Site Admin
Posts: 237
Joined: Wed Oct 26, 2011 9:29 pm

Re: {C} token

Post by Gimagukk » Tue Jul 17, 2012 7:25 pm

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.

Post Reply