title: Unclosed Group near index using Regex
body: <p>I am trying to test a phone numbers format using regular expressions, regex, and when I run the Pattern.compile I receive the error <strong>java.util.regex.PatternSyntaxException: Unclosed group near index 34</strong></p>
  
  <pre><code>public String checkPhoneNum(String inPhoneNum)
  {
      Pattern checkRegex = Pattern.compile("(\\([0-9]{3}\\)([0-9]{3}(-)[0-9]{4})");
      Matcher regexMatcher = checkRegex.matcher(inPhoneNum);
  
      if(regexMatcher.find())
      {
          return inPhoneNum;
      }
      else
          return null;
  }
  </code></pre>
  
  <p>is the string <code>(\\([0-9]{3}\\)([0-9]{3}(-)[0-9]{4})</code> not correctly written for format (000)111-2222?</p>