title: SAS equivalent for SQL validation of string data
body: <p>I'm trying to validate some alphanumeric data of length 6 and I have a working piece of code in SQL to do this, but I'm struggling with how to code this in SAS as a calculated column in my query.</p>
  
  <p>In SQL a valid string in my data meets the following criteria:</p>
  
  <pre><code>CASE 
     WHEN &lt;String&gt; LIKE '[a-z][0-9][a-z][0-9][a-z][0-9]' 
        THEN 'Valid'
        ELSE 'Invalid' 
  END
  </code></pre>
  
  <p>What functions can I use in SAS that will achieve this? I'm using SAS EG as my tool. </p>
  
  <p>Thanks!</p>