User Tools

Site Tools


reference:spamrules_statement_replace

Spam Filter Rules: Replace

Statement Replace
Version 2.3.5+
Purpose Replaces specified text in the specified variable with new text

Replace statements require a variable name, a search value and a replacement string, in the format

Replace <variable> <search> <replace>
  • The search expression can be a regular expression if desired.
  • The Replace statement will replace all occurrences of the search expression, not just the first occurrence.

Example

The following code will change the value of '${myvar}'

${myvar} = "hello, my friend"

Replace myvar "hello" "goodbye" 

# The new value of ${myvar} is "goodbye, my friend"
reference/spamrules_statement_replace.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1