I am trying to create a user macro with a body that takes in a string (ex. Hello - World). How do I store each word separated by the "-" in a variable? Below is what I have tried:
#set ($var1 = $body.split("-"))
#set ($var2 = $var1[0]) // also tried $var1.get(0). Should be "Hello"
#set ($var3 = $var1[1]) // also tried $var1.get(1). Should be "World"
I cannot get this to work for some reason. Any help would be appreciated!
Thanks,
Brian