Expanding variable groups in alias as regular expression

Posted by ErockMahan on Tue 06 Jul 2010 02:29 PM — 3 posts, 15,462 views.

#0
A recent update allowed triggers to pull from a variable list seperated by | indicators by using (@!list), but I don't see that it works with an alias as well. That is:

<aliases>
<alias
match="^Test (@!item)$"
enabled="y"
expand_variables="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.note "matched item"</send>
</alias>
</aliases>

won't work but this will:

<triggers>
<trigger
enabled="y"
expand_variables="y"
keep_evaluating="y"
match="^You get (@!item)$"
regexp="y"
send_to="12"
sequence="100"
>
<send>world.note "matched item"</send>
</trigger>
</triggers>

Has this not been implemented, or am I missing something?
USA #1
ErockMahan said:
Has this not been implemented, or am I missing something?


I've come across this too, and my guess is that it just hasn't been implemented in aliases.
Australia Forum Administrator #2
It hasn't been implemented in aliases. I think the reason was that for triggers, you may need to match many things (eg. colour the names of any of 1000 friends). However for aliases, you are less likely to be needing to do this.

A work-around for aliases is just to have something like "test *" and then in a script see if the wildcard matches a list of names. After all, aliases don't colour lines like triggers do.