Page 1 of 1

Rules for modifications - append?

Posted: 09 June 2017, 05:22
by drfrogsplat
I just came across the 'Modify Comment' action in the rules, and was quite excited, because sometimes I want to add some extra info to a comment to remind me of things later on. For example, the word 'refund' on refunds, or a guess at the purpose, or '???' if I know that I'm going to need to look more closely at something.

I tried using the 'Modify Comment' action to append some text, but found it only supports replacing.

Code: Select all

[Modify comment] by replacing [the string | the regular expression] [$] with [ - refund]
Usually with regular expressions I can 'replace' '$' with text to effectively append it, but this doesn't seem to work (I've confirmed the rule matches, because it sets the 'refund' checkbox, but doesn't append my text). Same for '^' to 'replace' the start of the string.

Could you please confirm whether '$' or '^' are meant to work?

If there's a technical problem supporting ^ and $, then perhaps we could get options to [replace|prepend|append] in the rules instead? (probably simpler for non-regexers too!)

thanks!

Re: Rules for modifications - append?

Posted: 10 June 2017, 09:58
by Angeman
You have to make an action like that : "Modify comment by replacing the regular expression (.*) with $1 - refund".