I'm a newbie to AwareIM but amazed by how much you can do with little effort. Aware IM really seems fantastic. I have however just struggled for 60 minutes trying to get REPLACE_PATTERN to work for me in a rule. I think I've discovered the following that might be useful for other newbies (please correct me if I'm wrong below!)
If you have a string and you want to swap elements of it using the REPLACE_PATTERN the following does not work :
Person.ParsedString = REPLACE_PATTERN(Person.StoryTemplate,'ReplaceTheFirstName',Person.FirstName')
but this does work
Person.ParsedString = REPLACE_PATTERN(Person.StoryTemplate,'ReplaceTheFirstName','<<Person.FirstName>>')
Also remember the second parameter of REPLACE_PATTERN respects regular expressions so if you put any special characters in it you need to escape them with a back slash. As per following to swap '{FirstName}'
Person.ParsedString = REPLACE_PATTERN(Person.StoryTemplate,'\{FirstName\}','<<Person.FirstName>>')