title: Isolating a particular section of one string in R that is between other characters?
body: <p>I am attempting to subset the portion of the string that is between the ( and the : ... ,(.</p>
  <pre><code>str &lt;- &quot;((Gs4:1,(Hs4:2,(Hs3:3,Hs2:4:5):6):7,(Gs1:1,(Gs2:2,(Hs1:3,Gs3:4):5):6):7);&quot;
  </code></pre>
  <p>I want to separate the two strings at the &quot;:7,&quot;; however the 7 is an unknown number.</p>
  <p>So it would look like this.</p>
  <blockquote>
  <p>((Gs4:1,(Hs4:2,(Hs3:3,Hs2:4:5):6):7,</p>
  </blockquote>
  <p>Suggestions? I have tried the examples using grep, but that only works for a string vector.</p>