title: Regex: match characterclass but not a specified string
body: <p>I am doing some major refactoring.</p>
  
  <pre><code>[a-z_]*(-&gt;|::)[sg]et_source\s*\(
  </code></pre>
  
  <p>matches anything like </p>
  
  <pre><code>$this-&gt;get_source() 
  $foobar-&gt;set_source ($x)
  self::get_source()
  </code></pre>
  
  <p>Now I want to exclude a specific class, say I want the [a-z_]* part NOT to match "foobar", e.g.</p>
  
  <pre><code>foobar::get_source()
  $foobar-&gt;get_source()
  </code></pre>
  
  <p>Is there an AND operator withhin the [], or do I need some negative lookbehind?</p>
  
  <p>EDIT: I am not parsing nor validating code, so no security concerns here. That´s gonna be a temporal precommit hook to warn about method calls considerd deprecated after the refactor.</p>
  
  <p>Thanks in advance.</p>