title: Incorrectly nested parentheses in regexp pattern
body: <p>I need to replace the string by another one. Sometimes the source string contains just an open parenthesis and it occurs a crash during the replace:</p>
  
  <p>ie with this string source: "#ABC (testing"</p>
  
  <p><code>string = string.replaceAll(src, replacement);</code></p>
  
  <p>And the crash is:</p>
  
  <pre><code>java.util.regex.PatternSyntaxException: Incorrectly nested parentheses in regexp pattern near index XXX
      #ABC (testing
                   ^
          at java.util.regex.Pattern.compileImpl(Native Method)
          at java.util.regex.Pattern.compile(Pattern.java:1340)
          at java.util.regex.Pattern.&lt;init&gt;(Pattern.java:1324)
          at java.util.regex.Pattern.compile(Pattern.java:946)
          at java.lang.String.replaceAll(String.java:2164)
  </code></pre>
  
  <p>Do you have an idea for this case guys?</p>
  
  <p>Thank you very much!</p>