title: Error with this regex : var worksheet = (.*)\\};
body: <p>I got an error with this regex : </p>
  
  <pre><code> Matcher worksheetMatcher = Pattern.compile(output).matcher("var worksheet = (.*)\\};");
  </code></pre>
  
  <p>Consider that output is a long html text that is read from web using jersey.</p>
  
  <p>The error is : </p>
  
  <pre><code>Exception in thread "main" java.util.regex.PatternSyntaxException: Illegal repetition near index 1150
  </code></pre>
  
  <p>I know that this error normally occurs when a character is not escaped but what is strange in this case is that the error still occurs if I try to match anything ".*", so that's why I'm here.</p>
  
  <p>So if anyone have any idea why I get this error, please post here, your help is a lot appreciated.</p>