title: How to remove all lowercase characters from a string using AWK?
body: <p>Please note that I need this answer in AWK.</p>
  
  <p>How can I remove all lowercase characters from some awk variable? I tried calling gsub:</p>
  
  <p><code>gsub(/[a-z]+/,"",varName);</code></p>
  
  <p>Unfortunately, that removes the whole string, as if awk cannot tell the difference between lower and upper case. Is there some regex-fu I can use that I'm not aware of?</p>
  
  <p>EDIT: Confirmed, awk does not see the difference between lowercase and uppercase characters.</p>
  
  <p>Example 1 (will use letter f here for better understanding of results):</p>
  
  <pre><code>varName="CHRFProtocol";
  gsub(/[a-z]/,"f",varName);
  </code></pre>
  
  <p>Result: <code>ffffffffffff</code></p>
  
  <p>Example 2 (again, will use letter f here for better understanding of results):</p>
  
  <pre><code>varName="CHRFProtocol";
  gsub(/[A-Z]/,"f",varName);
  </code></pre>
  
  <p>Result: <code>ffffffffffff</code></p>
  
  <p>Is this legitimate? What's doing on?</p>