This type of action is used to modify a particual variable's value, replacing the given string or regular expression with the new string you give. The following type-specific parameters are supported:
- Variable: the name of the variable to be modified.
- Tweak type: the type of operation, with the following options:
- Replace prefix: if the variable's value begins with a pattern string, this prefix is removed and the replacement prefix is prepended.
- Replace substring: replace any occurrence of pattern string with replacement string.
- Replace regexp: if the variable's value matches the regular expression you give as pattern, the variable will get the new value from replacement. In this case, the replacement parameter may contain references to text fragmets that matched a particular subexpression of pattern: \1 is the first parenthesized subexpression, \2 is the second one, and so on.
- Upcase and Downcase: the variable's value is converted to upper or lower case, respectively. Pattern and replacement strings are not used in this mode.
- Pattern, Replacement: see above.