title: Java Regexs: unexpected char: '('
body: <p>I am using processing 1.0.6, which runs on java 1.6. I have the following code:</p>
  
  <pre><code>Pattern pattern = Pattern.compile("func\((.*),(\-?[0-9\.]*),(\-?[0-9\.]*),(\-?[0-9\.]*)\)");
  </code></pre>
  
  <p>but it gives the error:</p>
  
  <pre><code>unexpected char: '('
  </code></pre>
  
  <p>and highlights the line I pasted above. If I change the offending <code>\(</code> to another character like <code>#</code>, it complains of the <code>\-</code> saying <code>unexpected char: '-'</code>. I should be able to use literals in a regex engine and it works in C#!</p>