title: R - Gsub return first match
body: <p>I want to extract the 12 and the 0 from the test vector. Every time I try it would either give me 120 or 12:0</p>
  
  <pre><code>TestVector &lt;- c("12:0")
  gsub("\\b[:numeric:]*",replacement = "\\1", x = TestVector, fixed = F)
  </code></pre>
  
  <p>What can I use to extract the 12 and the 0. Can we just have one where I just extract the 12 so I can change it to extract the 0. Can we do this exclusively with gsub?</p>