title: Parse big strings using a Regex to getting java.lang.StackOverflowError error
body: <p>This is my Regex</p>
  
  <pre><code>"(?&lt;=\"body\":\")((?=\",|\"$)|.)+"
  </code></pre>
  
  <p>It tokenizes a string on body. For example,</p>
  
  <pre><code>"body":its my string
  </code></pre>
  
  <p>Result is </p>
  
  <pre><code>its my string
  </code></pre>
  
  <p>But when I use a large input string I get this error</p>
  
  <pre><code>Exception in thread "main" java.lang.StackOverflowError
  at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
  at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
  at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
  at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
  at java.util.regex.Pattern$CharProperty.match(Pattern.java:3345)
  at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
  at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
  at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
  at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
  </code></pre>
  
  <p>How is this caused and how can I solve it?</p>