title: Regex group capture in R with multiple capture-groups
body: <p>In R, is it possible to extract group capture from a regular expression match?  As far as I can tell, none of <code>grep</code>, <code>grepl</code>, <code>regexpr</code>, <code>gregexpr</code>, <code>sub</code>, or <code>gsub</code> return the group captures.</p>
  
  <p>I need to extract key-value pairs from strings that are encoded thus:</p>
  
  <pre><code>\((.*?) :: (0\.[0-9]+)\)
  </code></pre>
  
  <p>I can always just do multiple full-match greps, or do some outside (non-R) processing, but I was hoping I can do it all within R.  Is there's a function or a package that provides such a function to do this?</p>