title: Regex - match anything except specific string
body: <p>I need a regex (will be used in ZF2 routing, I believe it uses the preg_match of php) that matches anything except a specific string.</p>
  
  <p>For example: I need to match anything except "red", "green" or "blue".</p>
  
  <p>I currently have the regex: </p>
  
  <pre><code>^(?!red|green|blue).*$
  
  test -&gt; match (correct)
  testred -&gt; match (correct)
  red -&gt; doesn't match (correct)
  redtest -&gt; doesn't match (incorrect)
  </code></pre>
  
  <p>In the last case, the regex is not behaving like I want. It should match "redtest" because "redtest" is not ("red", "green" or "blue").</p>
  
  <p>Any ideas of how to fix the regex?</p>