title: Java regex with vertical bar
body: <p>I wonder while the following regex returns false. I can't see while a "|" should not match. Any ideas? And how do I allow the pattern to match "|"?</p>
  
  <pre><code>Pattern pattern = Pattern.compile("([^\\*|\\\\|\\{|\\}|\\[|\\]|=|&gt;|&lt;])*");
  boolean valid = pattern.matcher("|").matches();
  </code></pre>
  
  <p>Thanks in advance.</p>