This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
reference:spamrules_statement_ifmatch [2011/08/22 14:37] – created simon | reference:spamrules_statement_ifmatch [2011/08/24 15:21] – simon | ||
---|---|---|---|
Line 6: | Line 6: | ||
**IfMatch** statements require a data parameter and a search value, in the format | **IfMatch** statements require a data parameter and a search value, in the format | ||
IfMatch < | IfMatch < | ||
+ | |||
+ | The **IfMatch** statement must be terminated with an **EndIf** and may contain an **Else** statement, just like the [[spamrules_statement_if|If]] statement. | ||
=====Data===== | =====Data===== | ||
Line 11: | Line 13: | ||
^${variable} | ^${variable} | ||
^text |This searches any plain text part of the message, but does not search attachments |2.1.7 | | ^text |This searches any plain text part of the message, but does not search attachments |2.1.7 | | ||
- | ^texta | + | ^texta |
^body |This searches any plain text or HTML part of the message. HTML parts have the HTML tags stripped out and are converted to plain text before searching them.|2.1.7 | | ^body |This searches any plain text or HTML part of the message. HTML parts have the HTML tags stripped out and are converted to plain text before searching them.|2.1.7 | | ||
- | ^bodya | + | ^bodya |
^anytext | ^anytext | ||
^anytexta | ^anytexta | ||
Line 53: | Line 55: | ||
^D |The dollar character matches only at the end of the search string. Without this, it can also match immediately before the final character if it is a newline character. | | ^D |The dollar character matches only at the end of the search string. Without this, it can also match immediately before the final character if it is a newline character. | | ||
^U |The search will be “ungreedy” instead of the default mode of greedy. | | ^U |The search will be “ungreedy” instead of the default mode of greedy. | | ||
- | |||
- | The **IfMatch** statement must be terminated with an **EndIf** and may contain an **Else** statement, just like the [[spamrules_statement_if|If]] statement. | ||