title: Rsyslog: how to negate 'contains' in if-then statement
body: <pre><code>if $programname == "service" then {
       if $msg !contains "test" then
           action(type="omfwd" 
              target="10.0.0.5"
              ...
              ) 
  }
  </code></pre>
  
  <p>I'm trying to <strong>exclude a msg if it contains word 'test'</strong>. Not sure how to negate 'contains'.</p>
  
  <p>From the <a href="https://www.rsyslog.com/doc/v8-stable/configuration/filters.html" rel="nofollow noreferrer">document</a>, it seems to be '!contains'. Tried it but no luck. </p>
  
  <p>Any idea?</p>