Is it possible to match on an element in a serialized string variable?
At the moment I can use something like this setup:
Example of one of the variables
I can use this in a trigger match like this.
With the correct settings i.e expand variables this matches correctly.
However, since I've serialized my variables i'm stuck on the syntax how to put this into a trigger if this is something you can do.
An example variable would be:
doing the below doesn't work.
I could check for the exact match by sending the wildcard to a script, however, I believe this would be a lot less efficient by firing the script a great deal more. Is that assumption correct?
The other option is creating a single variable with the desired value so the first instance worked.
Dak
At the moment I can use something like this setup:
Example of one of the variables
<variable name="potname">"heal"</variable>
I can use this in a trigger match like this.
^You\sdrop(?:[ ]+(\d+))?(\s\*){0,1}\s(@potname).$
With the correct settings i.e expand variables this matches correctly.
However, since I've serialized my variables i'm stuck on the syntax how to put this into a trigger if this is something you can do.
An example variable would be:
<variable name="potVars">{
potname = "heal",
potnum = "28",
}</variable>
doing the below doesn't work.
^You\sdrop(?:[ ]+(\d+))?(\s\*){0,1}\s(@potVars.potname).$
I could check for the exact match by sending the wildcard to a script, however, I believe this would be a lot less efficient by firing the script a great deal more. Is that assumption correct?
The other option is creating a single variable with the desired value so the first instance worked.
Dak