title: number some patterns in the string using R
body: <p>I have a strings and it has some patterns like this</p>
  
  <pre><code>my_string = "`d@k`0.55`0.55`0.55`0.55`0.55`0.55`0.55`0.55`0.55`n$l`0.4`0.1`0.25`0.28`0.18`0.3`0.17`0.2`0.03`!lk`0.04`0.04`0.04`0.04`0.04`0.04`0.04`0.04`0.04`vnabgjd`0.02`0.02`0.02`0.02`0.02`0.02`0.02`0.02`0.02`pogk(`1.01`0.71`0.86`0.89`0.79`0.91`0.78`0.81`0.64`r!#^#@niw`0.0014`0.0020`9.9999`9.9999`0.0020`0.0022`0.0032`9.9999`0.0000`
  </code></pre>
  
  <p>As you can see there is patterns [`nonnumber] then [`number.num~] repeated.
  So I want to identify how many [`number.num~] are between [`nonnumber].</p>
  
  <p>I tried to use regex </p>
  
  <pre><code>index &lt;- gregexpr("`(\\w{2,20})`\\d\\.\\d(.*?)`\\D",cle)
  regmatches(cle,index)
  </code></pre>
  
  <p>but using this code, the [`\D] is overlapped. so just It can't number how many the pattern are. 
  So if you know any method about it, please leave some reply</p>