Expand variable not working for branches in trigger bug

Posted by Roga on Sat 05 Oct 2002 12:30 PM — 3 posts, 13,817 views.

#0
Not sure this is a bug yet so didn't post it in the bug section. Also searched through several times and did not see it listed.

What's happening is that I have set variable testit to

(Noogie|Polk)

If I make a trigger with @testit and check Enabled, Regular Expression, and Expand Variables it does not catch Polk or Noogie when tested through the Trigger Test menu. It does catch "(Noogie|Polk)" (without the quotes). Now if I type in (Noogie|Polk) directly into the trigger and do not use the variable testit, it works fine and catches Noogie or Polk. I have tried many variations, including letting MushClient convert it to a regular expression and many formats on the @testit variable. Any suggestions as to what's going on?
Australia Forum Administrator #1
This is behaviour by design. It was deliberately done that way, so that if (for instance) the substitution string had special characters in it (eg. period, brackets, etc.) that would not corrupt the regular expression.

If you want to modify the regular expression itself (as opposed to substituting a simple name) you would need to do that in a script with addtrigger.
#2
Ahh, thought I remembered reading that somewhere but couldn't locate it. Thank you.