title: Extract String Between First and Second Whitespace
body: <p>I'm trying to extract a certain portion of the text in a column - I only want the text between the first and second whitespace - in this case the manufacture year.  The field is in column &quot;Detail&quot; within the dataframe &quot;data&quot;.  This is the structure which is consistent:</p>
  <p><strong>Used 2014 Toyota Camry</strong></p>
  <p>I'm only interested in capturing the &quot;2014&quot; within this field:</p>
  <p>Here is what I've tried:</p>
  <pre><code>sub(&quot;.*?\\s+(.*)\\s.*&quot;, &quot;\\1&quot;, &quot;Used 2014 Toyota Camry&quot;, perl=TRUE)
  </code></pre>
  <p>Help is much appreciated.</p>