title: Extract alphanumeric words and words with more than 1 uppercase using R
body: <p>I am new to R programming and want to try extracting alphanumeric words AND words containing more than 1 uppercase.</p>
  
  <p>Below is an example of the string and my desired output for it.</p>
  
  <pre><code>    x &lt;- c("123AB123 Electrical CDe FG123-4 ...", 
             "12/1/17 ABCD How are you today A123B", 
             "20.9.12 Eat / Drink XY1234 for PQRS1",
             "Going home H123a1 ab-cd1",
             "Change channel for al1234 to al5678")
  
      #Desired Output
      #[1] "123AB123 CDe FG123-4"  "ABCD A123B"  "XY1234 PQRS"  
      #[2] "H123a1 ab-cd1"  "al1234 al5678"
  </code></pre>
  
  <p>I have come across 2 separate solutions so far on Stack Overflow:</p>
  
  <ol>
  <li>Extracts all words that contain a number --> Not helpful to me because the column I'm applying the function to contains many date strings; "12/1/17 ABCD How are you today A123B"</li>
  <li>Identify strings that have more than one caps/uppercase --> <a href="https://stackoverflow.com/users/4564247/pierre-lafortune">Pierre Lafortune</a> has provided the following solution:</li>
  </ol>
  
  <p><a href="https://stackoverflow.com/questions/33197733/how-to-count-capslock-in-string-using-r">how-to-count-capslock-in-string-using-r</a></p>
  
  <pre><code>    library(stringr)
      str_count(x, "\\b[A-Z]{2,}\\b") 
  </code></pre>
  
  <p>His code provides the number of times a string has more than 1 uppercase but I want to extract those words in addition to extracting alphanumeric words too. </p>
  
  <p>Forgive me if my question or research is not comprehensive enough. I will post my researched solution for extracting all words containing a number in 12 hours when i have access to my work station which contains R and the dataset.  </p>