title: What is the difference between ==~ and != in Groovy?
body: <p>What is the difference between these?</p>
  
  <p>Why use one over the other? </p>
  
  <pre><code>def variable = 5
  if( variable ==~ 6 &amp;&amp; variable != 6 ) {
    return '==~ and != are not the same.'
  } else {
    return '==~ and != are the same.'
  }
  </code></pre>