title: Java regex match all characters except
body: <p>What is the correct syntax for matching all characters except specific ones.</p>
  
  <p>For example I'd like to match everything but letters <code>[A-Z] [a-z]</code> and numbers <code>[0-9]</code>.</p>
  
  <p>I have</p>
  
  <pre><code>string.matches("[^[A-Z][a-z][0-9]]")
  </code></pre>
  
  <p>Is this incorrect?</p>