title: java regex, matching math operators
body: <p>I am trying to write a regex to match math operators to a char.  I've tried a bunch of different things but i keep getting:</p>
  
  <blockquote>
    <p>Syntax error on tokens, Expression expected instead</p>
  </blockquote>
  
  <p>my code looks like this:</p>
  
  <pre><code>public static void readMath(char c) {
          if(c == [+\-*/]) {
              // do some stuff
          }
      }
  </code></pre>
  
  <p>i've tried escaping different things etc etc. i can't seem to get it to work.</p>