title: Regex matching everything that's not a 4 digit number
body: <p>I match and replace 4-digit numbers preceded and followed by white space with:</p>
  
  <pre><code>str12 &lt;- "coihr 1234 &amp;/()= jngm 34 ljd"
  sub("\\s\\d{4}\\s", "", str12)
  [1] "coihr&amp;/()= jngm 34 ljd"
  </code></pre>
  
  <p>but, every try to invert this and extract the number instead fails.
  I want:</p>
  
  <pre><code>[1] 1234
  </code></pre>
  
  <p>does someone has a clue?</p>
  
  <p>ps: I know how to do it with {stringr} but am wondering if it's possible with {base} only..</p>
  
  <pre><code>require(stringr)
  gsub("\\s", "", str_extract(str12, "\\s\\d{4}\\s"))
  [1] "1234"
  </code></pre>