|
astrotaz Beginner
Joined: 09 Aug 2011 Posts: 12
|
Posted: Sat Feb 01, 2014 8:42 pm
Testing a string in a variable |
I hope I can explain this well enough to get some help.
I'm using a trigger to capture some text and put it into a variable
for example
ITEM_A big round apple
I trigger on ITEM_&item
#SHOW @item has A big round apple
np so far ...
now if I want to perform an IF test on the variable @item
#IF (@item="*apple") {do something} {do nothing}
How can I use a wildcard to just test for the presence of apple in that variable without having to test #IF (@item="A big round apple") etc.etc..
Thanks
-A |
|
|
|
astrotaz Beginner
Joined: 09 Aug 2011 Posts: 12
|
Posted: Sat Feb 01, 2014 8:47 pm resolved |
sorry for the trouble I found the answer
#IF (@item=~"* apple") |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sun Feb 02, 2014 6:48 am |
%match(@item, "apple")
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|