title: SAS finding an uppercase word within a string
body: <p>I have a string which contains one word in uppercase somewhere within it.  I want to extract that one word into a new variable using SAS.</p>
  
  <p>I think I need to find a way to code up finding a word which contains two or more uppercase letters (as the start of a sentence would begin with an uppercase letter).</p>
  
  <p>i.e. How do I create the variable 'word':</p>
  
  <pre><code>data example;
  
      length txtString $50;
  
      length word $20;
  
      infile datalines dlm=',';
  
      input txtString $ word $;
  
  datalines;
  
  This is one EXAMPLE. Of what I need.,EXAMPLE
  
  THIS is another.,THIS
  
  etc ETC,ETC
  
  ;
  
  run;
  </code></pre>
  
  <p>Hope someone can help and the question is clear</p>
  
  <p>Thanks in advance</p>